Text Compare
Produced: 7/19/2015 1:58:10 PM
   
Mode:  All, With Context  
Left file: C:\mksong\workspace_genproglase\genproglase-output-r1658\template09\0718-1345\valgrind-bug-11771-11770\sanity\coregrind\m_scheduler\scheduler.c  
Right file: C:\mksong\workspace_genproglase\genproglase-output-r1658\template09\0718-1345\valgrind-bug-11771-11770\000000\coregrind\m_scheduler\scheduler.c  
1 typedef unsigned char UChar; = 1 typedef unsigned char UChar;
2 typedef signed char Char;   2 typedef signed char Char;
3 typedef char HChar;   3 typedef char HChar;
4 typedef unsigned short UShort;   4 typedef unsigned short UShort;
5 typedef short Short;   5 typedef short Short;
6 typedef unsigned int UInt;   6 typedef unsigned int UInt;
7 typedef int Int;   7 typedef int Int;
8 typedef unsigned long long ULong;   8 typedef unsigned long long ULong;
9 typedef long long Long;   9 typedef long long Long;
10 typedef UInt U128[4];   10 typedef UInt U128[4];
11 union __anonunion_V128_1 {   11 union __anonunion_V128_1 {
12    UChar w8[16] ;   12    UChar w8[16] ;
13    UShort w16[8] ;   13    UShort w16[8] ;
14    UInt w32[4] ;   14    UInt w32[4] ;
15    ULong w64[2] ;   15    ULong w64[2] ;
16 };   16 };
17 typedef union __anonunion_V128_1 V128;   17 typedef union __anonunion_V128_1 V128;
18 typedef float Float;   18 typedef float Float;
19 typedef double Double;   19 typedef double Double;
20 typedef unsigned char Bool;   20 typedef unsigned char Bool;
21 typedef UInt Addr32;   21 typedef UInt Addr32;
22 typedef ULong Addr64;   22 typedef ULong Addr64;
23 typedef unsigned long HWord;   23 typedef unsigned long HWord;
24 typedef __builtin_va_list __gnuc_va_list;   24 typedef __builtin_va_list __gnuc_va_list;
25 typedef __gnuc_va_list va_list;   25 typedef __gnuc_va_list va_list;
26 typedef unsigned long UWord;   26 typedef unsigned long UWord;
27 typedef long Word;   27 typedef long Word;
28 typedef UWord Addr;   28 typedef UWord Addr;
29 typedef UWord AddrH;   29 typedef UWord AddrH;
30 typedef UWord SizeT;   30 typedef UWord SizeT;
31 typedef Word SSizeT;   31 typedef Word SSizeT;
32 typedef Word PtrdiffT;   32 typedef Word PtrdiffT;
33 typedef Word OffT;   33 typedef Word OffT;
34 typedef Long Off64T;   34 typedef Long Off64T;
35 struct __anonstruct_UWordPair_2 {   35 struct __anonstruct_UWordPair_2 {
36    UWord uw1 ;   36    UWord uw1 ;
37    UWord uw2 ;   37    UWord uw2 ;
38 };   38 };
39 typedef struct __anonstruct_UWordPair_2 UWordPair;   39 typedef struct __anonstruct_UWordPair_2 UWordPair;
40 typedef UInt ThreadId;   40 typedef UInt ThreadId;
41 struct __anonstruct_SysRes_3 {   41 struct __anonstruct_SysRes_3 {
42    UWord _val ;   42    UWord _val ;
43    Bool _isError ;   43    Bool _isError ;
44 };   44 };
45 typedef struct __anonstruct_SysRes_3 SysRes;   45 typedef struct __anonstruct_SysRes_3 SysRes;
46 enum __anonenum_IRType_4 {   46 enum __anonenum_IRType_4 {
47     Ity_INVALID = 69632,   47     Ity_INVALID = 69632,
48     Ity_I1 = 69633,   48     Ity_I1 = 69633,
49     Ity_I8 = 69634,   49     Ity_I8 = 69634,
50     Ity_I16 = 69635,   50     Ity_I16 = 69635,
51     Ity_I32 = 69636,   51     Ity_I32 = 69636,
52     Ity_I64 = 69637,   52     Ity_I64 = 69637,
53     Ity_I128 = 69638,   53     Ity_I128 = 69638,
54     Ity_F32 = 69639,   54     Ity_F32 = 69639,
55     Ity_F64 = 69640,   55     Ity_F64 = 69640,
56     Ity_F128 = 69641,   56     Ity_F128 = 69641,
57     Ity_V128 = 69642   57     Ity_V128 = 69642
58 } ;   58 } ;
59 typedef enum __anonenum_IRType_4 IRType;   59 typedef enum __anonenum_IRType_4 IRType;
60 enum __anonenum_IREndness_5 {   60 enum __anonenum_IREndness_5 {
61     Iend_LE = 73728,   61     Iend_LE = 73728,
62     Iend_BE = 73729   62     Iend_BE = 73729
63 } ;   63 } ;
64 typedef enum __anonenum_IREndness_5 IREndness;   64 typedef enum __anonenum_IREndness_5 IREndness;
65 enum __anonenum_IRConstTag_6 {   65 enum __anonenum_IRConstTag_6 {
66     Ico_U1 = 77824,   66     Ico_U1 = 77824,
67     Ico_U8 = 77825,   67     Ico_U8 = 77825,
68     Ico_U16 = 77826,   68     Ico_U16 = 77826,
69     Ico_U32 = 77827,   69     Ico_U32 = 77827,
70     Ico_U64 = 77828,   70     Ico_U64 = 77828,
71     Ico_F32 = 77829,   71     Ico_F32 = 77829,
72     Ico_F32i = 77830,   72     Ico_F32i = 77830,
73     Ico_F64 = 77831,   73     Ico_F64 = 77831,
74     Ico_F64i = 77832,   74     Ico_F64i = 77832,
75     Ico_V128 = 77833   75     Ico_V128 = 77833
76 } ;   76 } ;
77 typedef enum __anonenum_IRConstTag_6 IRConstTag;   77 typedef enum __anonenum_IRConstTag_6 IRConstTag;
78 union __anonunion_Ico_7 {   78 union __anonunion_Ico_7 {
79    Bool U1 ;   79    Bool U1 ;
80    UChar U8 ;   80    UChar U8 ;
81    UShort U16 ;   81    UShort U16 ;
82    UInt U32 ;   82    UInt U32 ;
83    ULong U64 ;   83    ULong U64 ;
84    Float F32 ;   84    Float F32 ;
85    UInt F32i ;   85    UInt F32i ;
86    Double F64 ;   86    Double F64 ;
87    ULong F64i ;   87    ULong F64i ;
88    UShort V128 ;   88    UShort V128 ;
89 };   89 };
90 struct _IRConst {   90 struct _IRConst {
91    IRConstTag tag ;   91    IRConstTag tag ;
92    union __anonunion_Ico_7 Ico ;   92    union __anonunion_Ico_7 Ico ;
93 };   93 };
94 typedef struct _IRConst IRConst;   94 typedef struct _IRConst IRConst;
95 struct __anonstruct_IRCallee_8 {   95 struct __anonstruct_IRCallee_8 {
96    Int regparms ;   96    Int regparms ;
97    HChar *name ;   97    HChar *name ;
98    void *addr ;   98    void *addr ;
99    UInt mcx_mask ;   99    UInt mcx_mask ;
100 };   100 };
101 typedef struct __anonstruct_IRCallee_8 IRCallee;   101 typedef struct __anonstruct_IRCallee_8 IRCallee;
102 struct __anonstruct_IRRegArray_9 {   102 struct __anonstruct_IRRegArray_9 {
103    Int base ;   103    Int base ;
104    IRType elemTy ;   104    IRType elemTy ;
105    Int nElems ;   105    Int nElems ;
106 };   106 };
107 typedef struct __anonstruct_IRRegArray_9 IRRegArray;   107 typedef struct __anonstruct_IRRegArray_9 IRRegArray;
108 typedef UInt IRTemp;   108 typedef UInt IRTemp;
109 enum __anonenum_IROp_10 {   109 enum __anonenum_IROp_10 {
110     Iop_INVALID = 81920,   110     Iop_INVALID = 81920,
111     Iop_Add8 = 81921,   111     Iop_Add8 = 81921,
112     Iop_Add16 = 81922,   112     Iop_Add16 = 81922,
113     Iop_Add32 = 81923,   113     Iop_Add32 = 81923,
114     Iop_Add64 = 81924,   114     Iop_Add64 = 81924,
115     Iop_Sub8 = 81925,   115     Iop_Sub8 = 81925,
116     Iop_Sub16 = 81926,   116     Iop_Sub16 = 81926,
117     Iop_Sub32 = 81927,   117     Iop_Sub32 = 81927,
118     Iop_Sub64 = 81928,   118     Iop_Sub64 = 81928,
119     Iop_Mul8 = 81929,   119     Iop_Mul8 = 81929,
120     Iop_Mul16 = 81930,   120     Iop_Mul16 = 81930,
121     Iop_Mul32 = 81931,   121     Iop_Mul32 = 81931,
122     Iop_Mul64 = 81932,   122     Iop_Mul64 = 81932,
123     Iop_Or8 = 81933,   123     Iop_Or8 = 81933,
124     Iop_Or16 = 81934,   124     Iop_Or16 = 81934,
125     Iop_Or32 = 81935,   125     Iop_Or32 = 81935,
126     Iop_Or64 = 81936,   126     Iop_Or64 = 81936,
127     Iop_And8 = 81937,   127     Iop_And8 = 81937,
128     Iop_And16 = 81938,   128     Iop_And16 = 81938,
129     Iop_And32 = 81939,   129     Iop_And32 = 81939,
130     Iop_And64 = 81940,   130     Iop_And64 = 81940,
131     Iop_Xor8 = 81941,   131     Iop_Xor8 = 81941,
132     Iop_Xor16 = 81942,   132     Iop_Xor16 = 81942,
133     Iop_Xor32 = 81943,   133     Iop_Xor32 = 81943,
134     Iop_Xor64 = 81944,   134     Iop_Xor64 = 81944,
135     Iop_Shl8 = 81945,   135     Iop_Shl8 = 81945,
136     Iop_Shl16 = 81946,   136     Iop_Shl16 = 81946,
137     Iop_Shl32 = 81947,   137     Iop_Shl32 = 81947,
138     Iop_Shl64 = 81948,   138     Iop_Shl64 = 81948,
139     Iop_Shr8 = 81949,   139     Iop_Shr8 = 81949,
140     Iop_Shr16 = 81950,   140     Iop_Shr16 = 81950,
141     Iop_Shr32 = 81951,   141     Iop_Shr32 = 81951,
142     Iop_Shr64 = 81952,   142     Iop_Shr64 = 81952,
143     Iop_Sar8 = 81953,   143     Iop_Sar8 = 81953,
144     Iop_Sar16 = 81954,   144     Iop_Sar16 = 81954,
145     Iop_Sar32 = 81955,   145     Iop_Sar32 = 81955,
146     Iop_Sar64 = 81956,   146     Iop_Sar64 = 81956,
147     Iop_CmpEQ8 = 81957,   147     Iop_CmpEQ8 = 81957,
148     Iop_CmpEQ16 = 81958,   148     Iop_CmpEQ16 = 81958,
149     Iop_CmpEQ32 = 81959,   149     Iop_CmpEQ32 = 81959,
150     Iop_CmpEQ64 = 81960,   150     Iop_CmpEQ64 = 81960,
151     Iop_CmpNE8 = 81961,   151     Iop_CmpNE8 = 81961,
152     Iop_CmpNE16 = 81962,   152     Iop_CmpNE16 = 81962,
153     Iop_CmpNE32 = 81963,   153     Iop_CmpNE32 = 81963,
154     Iop_CmpNE64 = 81964,   154     Iop_CmpNE64 = 81964,
155     Iop_Not8 = 81965,   155     Iop_Not8 = 81965,
156     Iop_Not16 = 81966,   156     Iop_Not16 = 81966,
157     Iop_Not32 = 81967,   157     Iop_Not32 = 81967,
158     Iop_Not64 = 81968,   158     Iop_Not64 = 81968,
159     Iop_CasCmpEQ8 = 81969,   159     Iop_CasCmpEQ8 = 81969,
160     Iop_CasCmpEQ16 = 81970,   160     Iop_CasCmpEQ16 = 81970,
161     Iop_CasCmpEQ32 = 81971,   161     Iop_CasCmpEQ32 = 81971,
162     Iop_CasCmpEQ64 = 81972,   162     Iop_CasCmpEQ64 = 81972,
163     Iop_CasCmpNE8 = 81973,   163     Iop_CasCmpNE8 = 81973,
164     Iop_CasCmpNE16 = 81974,   164     Iop_CasCmpNE16 = 81974,
165     Iop_CasCmpNE32 = 81975,   165     Iop_CasCmpNE32 = 81975,
166     Iop_CasCmpNE64 = 81976,   166     Iop_CasCmpNE64 = 81976,
167     Iop_MullS8 = 81977,   167     Iop_MullS8 = 81977,
168     Iop_MullS16 = 81978,   168     Iop_MullS16 = 81978,
169     Iop_MullS32 = 81979,   169     Iop_MullS32 = 81979,
170     Iop_MullS64 = 81980,   170     Iop_MullS64 = 81980,
171     Iop_MullU8 = 81981,   171     Iop_MullU8 = 81981,
172     Iop_MullU16 = 81982,   172     Iop_MullU16 = 81982,
173     Iop_MullU32 = 81983,   173     Iop_MullU32 = 81983,
174     Iop_MullU64 = 81984,   174     Iop_MullU64 = 81984,
175     Iop_Clz64 = 81985,   175     Iop_Clz64 = 81985,
176     Iop_Clz32 = 81986,   176     Iop_Clz32 = 81986,
177     Iop_Ctz64 = 81987,   177     Iop_Ctz64 = 81987,
178     Iop_Ctz32 = 81988,   178     Iop_Ctz32 = 81988,
179     Iop_CmpLT32S = 81989,   179     Iop_CmpLT32S = 81989,
180     Iop_CmpLT64S = 81990,   180     Iop_CmpLT64S = 81990,
181     Iop_CmpLE32S = 81991,   181     Iop_CmpLE32S = 81991,
182     Iop_CmpLE64S = 81992,   182     Iop_CmpLE64S = 81992,
183     Iop_CmpLT32U = 81993,   183     Iop_CmpLT32U = 81993,
184     Iop_CmpLT64U = 81994,   184     Iop_CmpLT64U = 81994,
185     Iop_CmpLE32U = 81995,   185     Iop_CmpLE32U = 81995,
186     Iop_CmpLE64U = 81996,   186     Iop_CmpLE64U = 81996,
187     Iop_CmpNEZ8 = 81997,   187     Iop_CmpNEZ8 = 81997,
188     Iop_CmpNEZ16 = 81998,   188     Iop_CmpNEZ16 = 81998,
189     Iop_CmpNEZ32 = 81999,   189     Iop_CmpNEZ32 = 81999,
190     Iop_CmpNEZ64 = 82000,   190     Iop_CmpNEZ64 = 82000,
191     Iop_CmpwNEZ32 = 82001,   191     Iop_CmpwNEZ32 = 82001,
192     Iop_CmpwNEZ64 = 82002,   192     Iop_CmpwNEZ64 = 82002,
193     Iop_Left8 = 82003,   193     Iop_Left8 = 82003,
194     Iop_Left16 = 82004,   194     Iop_Left16 = 82004,
195     Iop_Left32 = 82005,   195     Iop_Left32 = 82005,
196     Iop_Left64 = 82006,   196     Iop_Left64 = 82006,
197     Iop_Max32U = 82007,   197     Iop_Max32U = 82007,
198     Iop_CmpORD32U = 82008,   198     Iop_CmpORD32U = 82008,
199     Iop_CmpORD64U = 82009,   199     Iop_CmpORD64U = 82009,
200     Iop_CmpORD32S = 82010,   200     Iop_CmpORD32S = 82010,
201     Iop_CmpORD64S = 82011,   201     Iop_CmpORD64S = 82011,
202     Iop_DivU32 = 82012,   202     Iop_DivU32 = 82012,
203     Iop_DivS32 = 82013,   203     Iop_DivS32 = 82013,
204     Iop_DivU64 = 82014,   204     Iop_DivU64 = 82014,
205     Iop_DivS64 = 82015,   205     Iop_DivS64 = 82015,
206     Iop_DivModU64to32 = 82016,   206     Iop_DivModU64to32 = 82016,
207     Iop_DivModS64to32 = 82017,   207     Iop_DivModS64to32 = 82017,
208     Iop_DivModU128to64 = 82018,   208     Iop_DivModU128to64 = 82018,
209     Iop_DivModS128to64 = 82019,   209     Iop_DivModS128to64 = 82019,
210     Iop_DivModS64to64 = 82020,   210     Iop_DivModS64to64 = 82020,
211     Iop_8Uto16 = 82021,   211     Iop_8Uto16 = 82021,
212     Iop_8Uto32 = 82022,   212     Iop_8Uto32 = 82022,
213     Iop_8Uto64 = 82023,   213     Iop_8Uto64 = 82023,
214     Iop_16Uto32 = 82024,   214     Iop_16Uto32 = 82024,
215     Iop_16Uto64 = 82025,   215     Iop_16Uto64 = 82025,
216     Iop_32Uto64 = 82026,   216     Iop_32Uto64 = 82026,
217     Iop_8Sto16 = 82027,   217     Iop_8Sto16 = 82027,
218     Iop_8Sto32 = 82028,   218     Iop_8Sto32 = 82028,
219     Iop_8Sto64 = 82029,   219     Iop_8Sto64 = 82029,
220     Iop_16Sto32 = 82030,   220     Iop_16Sto32 = 82030,
221     Iop_16Sto64 = 82031,   221     Iop_16Sto64 = 82031,
222     Iop_32Sto64 = 82032,   222     Iop_32Sto64 = 82032,
223     Iop_64to8 = 82033,   223     Iop_64to8 = 82033,
224     Iop_32to8 = 82034,   224     Iop_32to8 = 82034,
225     Iop_64to16 = 82035,   225     Iop_64to16 = 82035,
226     Iop_16to8 = 82036,   226     Iop_16to8 = 82036,
227     Iop_16HIto8 = 82037,   227     Iop_16HIto8 = 82037,
228     Iop_8HLto16 = 82038,   228     Iop_8HLto16 = 82038,
229     Iop_32to16 = 82039,   229     Iop_32to16 = 82039,
230     Iop_32HIto16 = 82040,   230     Iop_32HIto16 = 82040,
231     Iop_16HLto32 = 82041,   231     Iop_16HLto32 = 82041,
232     Iop_64to32 = 82042,   232     Iop_64to32 = 82042,
233     Iop_64HIto32 = 82043,   233     Iop_64HIto32 = 82043,
234     Iop_32HLto64 = 82044,   234     Iop_32HLto64 = 82044,
235     Iop_128to64 = 82045,   235     Iop_128to64 = 82045,
236     Iop_128HIto64 = 82046,   236     Iop_128HIto64 = 82046,
237     Iop_64HLto128 = 82047,   237     Iop_64HLto128 = 82047,
238     Iop_Not1 = 82048,   238     Iop_Not1 = 82048,
239     Iop_32to1 = 82049,   239     Iop_32to1 = 82049,
240     Iop_64to1 = 82050,   240     Iop_64to1 = 82050,
241     Iop_1Uto8 = 82051,   241     Iop_1Uto8 = 82051,
242     Iop_1Uto32 = 82052,   242     Iop_1Uto32 = 82052,
243     Iop_1Uto64 = 82053,   243     Iop_1Uto64 = 82053,
244     Iop_1Sto8 = 82054,   244     Iop_1Sto8 = 82054,
245     Iop_1Sto16 = 82055,   245     Iop_1Sto16 = 82055,
246     Iop_1Sto32 = 82056,   246     Iop_1Sto32 = 82056,
247     Iop_1Sto64 = 82057,   247     Iop_1Sto64 = 82057,
248     Iop_AddF64 = 82058,   248     Iop_AddF64 = 82058,
249     Iop_SubF64 = 82059,   249     Iop_SubF64 = 82059,
250     Iop_MulF64 = 82060,   250     Iop_MulF64 = 82060,
251     Iop_DivF64 = 82061,   251     Iop_DivF64 = 82061,
252     Iop_AddF32 = 82062,   252     Iop_AddF32 = 82062,
253     Iop_SubF32 = 82063,   253     Iop_SubF32 = 82063,
254     Iop_MulF32 = 82064,   254     Iop_MulF32 = 82064,
255     Iop_DivF32 = 82065,   255     Iop_DivF32 = 82065,
256     Iop_AddF64r32 = 82066,   256     Iop_AddF64r32 = 82066,
257     Iop_SubF64r32 = 82067,   257     Iop_SubF64r32 = 82067,
258     Iop_MulF64r32 = 82068,   258     Iop_MulF64r32 = 82068,
259     Iop_DivF64r32 = 82069,   259     Iop_DivF64r32 = 82069,
260     Iop_NegF64 = 82070,   260     Iop_NegF64 = 82070,
261     Iop_AbsF64 = 82071,   261     Iop_AbsF64 = 82071,
262     Iop_NegF32 = 82072,   262     Iop_NegF32 = 82072,
263     Iop_AbsF32 = 82073,   263     Iop_AbsF32 = 82073,
264     Iop_SqrtF64 = 82074,   264     Iop_SqrtF64 = 82074,
265     Iop_SqrtF64r32 = 82075,   265     Iop_SqrtF64r32 = 82075,
266     Iop_SqrtF32 = 82076,   266     Iop_SqrtF32 = 82076,
267     Iop_CmpF64 = 82077,   267     Iop_CmpF64 = 82077,
268     Iop_CmpF32 = 82078,   268     Iop_CmpF32 = 82078,
269     Iop_CmpF128 = 82079,   269     Iop_CmpF128 = 82079,
270     Iop_F64toI16S = 82080,   270     Iop_F64toI16S = 82080,
271     Iop_F64toI32S = 82081,   271     Iop_F64toI32S = 82081,
272     Iop_F64toI64S = 82082,   272     Iop_F64toI64S = 82082,
273     Iop_F64toI32U = 82083,   273     Iop_F64toI32U = 82083,
274     Iop_I16StoF64 = 82084,   274     Iop_I16StoF64 = 82084,
275     Iop_I32StoF64 = 82085,   275     Iop_I32StoF64 = 82085,
276     Iop_I64StoF64 = 82086,   276     Iop_I64StoF64 = 82086,
277     Iop_I64UtoF64 = 82087,   277     Iop_I64UtoF64 = 82087,
278     Iop_I64UtoF32 = 82088,   278     Iop_I64UtoF32 = 82088,
279     Iop_I32UtoF64 = 82089,   279     Iop_I32UtoF64 = 82089,
280     Iop_F32toI16S = 82090,   280     Iop_F32toI16S = 82090,
281     Iop_F32toI32S = 82091,   281     Iop_F32toI32S = 82091,
282     Iop_F32toI64S = 82092,   282     Iop_F32toI64S = 82092,
283     Iop_I16StoF32 = 82093,   283     Iop_I16StoF32 = 82093,
284     Iop_I32StoF32 = 82094,   284     Iop_I32StoF32 = 82094,
285     Iop_I64StoF32 = 82095,   285     Iop_I64StoF32 = 82095,
286     Iop_F32toF64 = 82096,   286     Iop_F32toF64 = 82096,
287     Iop_F64toF32 = 82097,   287     Iop_F64toF32 = 82097,
288     Iop_ReinterpF64asI64 = 82098,   288     Iop_ReinterpF64asI64 = 82098,
289     Iop_ReinterpI64asF64 = 82099,   289     Iop_ReinterpI64asF64 = 82099,
290     Iop_ReinterpF32asI32 = 82100,   290     Iop_ReinterpF32asI32 = 82100,
291     Iop_ReinterpI32asF32 = 82101,   291     Iop_ReinterpI32asF32 = 82101,
292     Iop_F64HLtoF128 = 82102,   292     Iop_F64HLtoF128 = 82102,
293     Iop_F128HItoF64 = 82103,   293     Iop_F128HItoF64 = 82103,
294     Iop_F128LOtoF64 = 82104,   294     Iop_F128LOtoF64 = 82104,
295     Iop_AddF128 = 82105,   295     Iop_AddF128 = 82105,
296     Iop_SubF128 = 82106,   296     Iop_SubF128 = 82106,
297     Iop_MulF128 = 82107,   297     Iop_MulF128 = 82107,
298     Iop_DivF128 = 82108,   298     Iop_DivF128 = 82108,
299     Iop_NegF128 = 82109,   299     Iop_NegF128 = 82109,
300     Iop_AbsF128 = 82110,   300     Iop_AbsF128 = 82110,
301     Iop_SqrtF128 = 82111,   301     Iop_SqrtF128 = 82111,
302     Iop_I32StoF128 = 82112,   302     Iop_I32StoF128 = 82112,
303     Iop_I64StoF128 = 82113,   303     Iop_I64StoF128 = 82113,
304     Iop_F32toF128 = 82114,   304     Iop_F32toF128 = 82114,
305     Iop_F64toF128 = 82115,   305     Iop_F64toF128 = 82115,
306     Iop_F128toI32S = 82116,   306     Iop_F128toI32S = 82116,
307     Iop_F128toI64S = 82117,   307     Iop_F128toI64S = 82117,
308     Iop_F128toF64 = 82118,   308     Iop_F128toF64 = 82118,
309     Iop_F128toF32 = 82119,   309     Iop_F128toF32 = 82119,
310     Iop_AtanF64 = 82120,   310     Iop_AtanF64 = 82120,
311     Iop_Yl2xF64 = 82121,   311     Iop_Yl2xF64 = 82121,
312     Iop_Yl2xp1F64 = 82122,   312     Iop_Yl2xp1F64 = 82122,
313     Iop_PRemF64 = 82123,   313     Iop_PRemF64 = 82123,
314     Iop_PRemC3210F64 = 82124,   314     Iop_PRemC3210F64 = 82124,
315     Iop_PRem1F64 = 82125,   315     Iop_PRem1F64 = 82125,
316     Iop_PRem1C3210F64 = 82126,   316     Iop_PRem1C3210F64 = 82126,
317     Iop_ScaleF64 = 82127,   317     Iop_ScaleF64 = 82127,
318     Iop_SinF64 = 82128,   318     Iop_SinF64 = 82128,
319     Iop_CosF64 = 82129,   319     Iop_CosF64 = 82129,
320     Iop_TanF64 = 82130,   320     Iop_TanF64 = 82130,
321     Iop_2xm1F64 = 82131,   321     Iop_2xm1F64 = 82131,
322     Iop_RoundF64toInt = 82132,   322     Iop_RoundF64toInt = 82132,
323     Iop_RoundF32toInt = 82133,   323     Iop_RoundF32toInt = 82133,
324     Iop_MAddF32 = 82134,   324     Iop_MAddF32 = 82134,
325     Iop_MSubF32 = 82135,   325     Iop_MSubF32 = 82135,
326     Iop_MAddF64 = 82136,   326     Iop_MAddF64 = 82136,
327     Iop_MSubF64 = 82137,   327     Iop_MSubF64 = 82137,
328     Iop_MAddF64r32 = 82138,   328     Iop_MAddF64r32 = 82138,
329     Iop_MSubF64r32 = 82139,   329     Iop_MSubF64r32 = 82139,
330     Iop_Est5FRSqrt = 82140,   330     Iop_Est5FRSqrt = 82140,
331     Iop_RoundF64toF64_NEAREST = 82141,   331     Iop_RoundF64toF64_NEAREST = 82141,
332     Iop_RoundF64toF64_NegINF = 82142,   332     Iop_RoundF64toF64_NegINF = 82142,
333     Iop_RoundF64toF64_PosINF = 82143,   333     Iop_RoundF64toF64_PosINF = 82143,
334     Iop_RoundF64toF64_ZERO = 82144,   334     Iop_RoundF64toF64_ZERO = 82144,
335     Iop_TruncF64asF32 = 82145,   335     Iop_TruncF64asF32 = 82145,
336     Iop_RoundF64toF32 = 82146,   336     Iop_RoundF64toF32 = 82146,
337     Iop_CalcFPRF = 82147,   337     Iop_CalcFPRF = 82147,
338     Iop_Add16x2 = 82148,   338     Iop_Add16x2 = 82148,
339     Iop_Sub16x2 = 82149,   339     Iop_Sub16x2 = 82149,
340     Iop_QAdd16Sx2 = 82150,   340     Iop_QAdd16Sx2 = 82150,
341     Iop_QAdd16Ux2 = 82151,   341     Iop_QAdd16Ux2 = 82151,
342     Iop_QSub16Sx2 = 82152,   342     Iop_QSub16Sx2 = 82152,
343     Iop_QSub16Ux2 = 82153,   343     Iop_QSub16Ux2 = 82153,
344     Iop_HAdd16Ux2 = 82154,   344     Iop_HAdd16Ux2 = 82154,
345     Iop_HAdd16Sx2 = 82155,   345     Iop_HAdd16Sx2 = 82155,
346     Iop_HSub16Ux2 = 82156,   346     Iop_HSub16Ux2 = 82156,
347     Iop_HSub16Sx2 = 82157,   347     Iop_HSub16Sx2 = 82157,
348     Iop_Add8x4 = 82158,   348     Iop_Add8x4 = 82158,
349     Iop_Sub8x4 = 82159,   349     Iop_Sub8x4 = 82159,
350     Iop_QAdd8Sx4 = 82160,   350     Iop_QAdd8Sx4 = 82160,
351     Iop_QAdd8Ux4 = 82161,   351     Iop_QAdd8Ux4 = 82161,
352     Iop_QSub8Sx4 = 82162,   352     Iop_QSub8Sx4 = 82162,
353     Iop_QSub8Ux4 = 82163,   353     Iop_QSub8Ux4 = 82163,
354     Iop_HAdd8Ux4 = 82164,   354     Iop_HAdd8Ux4 = 82164,
355     Iop_HAdd8Sx4 = 82165,   355     Iop_HAdd8Sx4 = 82165,
356     Iop_HSub8Ux4 = 82166,   356     Iop_HSub8Ux4 = 82166,
357     Iop_HSub8Sx4 = 82167,   357     Iop_HSub8Sx4 = 82167,
358     Iop_Sad8Ux4 = 82168,   358     Iop_Sad8Ux4 = 82168,
359     Iop_CmpNEZ16x2 = 82169,   359     Iop_CmpNEZ16x2 = 82169,
360     Iop_CmpNEZ8x4 = 82170,   360     Iop_CmpNEZ8x4 = 82170,
361     Iop_I32UtoFx2 = 82171,   361     Iop_I32UtoFx2 = 82171,
362     Iop_I32StoFx2 = 82172,   362     Iop_I32StoFx2 = 82172,
363     Iop_FtoI32Ux2_RZ = 82173,   363     Iop_FtoI32Ux2_RZ = 82173,
364     Iop_FtoI32Sx2_RZ = 82174,   364     Iop_FtoI32Sx2_RZ = 82174,
365     Iop_F32ToFixed32Ux2_RZ = 82175,   365     Iop_F32ToFixed32Ux2_RZ = 82175,
366     Iop_F32ToFixed32Sx2_RZ = 82176,   366     Iop_F32ToFixed32Sx2_RZ = 82176,
367     Iop_Fixed32UToF32x2_RN = 82177,   367     Iop_Fixed32UToF32x2_RN = 82177,
368     Iop_Fixed32SToF32x2_RN = 82178,   368     Iop_Fixed32SToF32x2_RN = 82178,
369     Iop_Max32Fx2 = 82179,   369     Iop_Max32Fx2 = 82179,
370     Iop_Min32Fx2 = 82180,   370     Iop_Min32Fx2 = 82180,
371     Iop_PwMax32Fx2 = 82181,   371     Iop_PwMax32Fx2 = 82181,
372     Iop_PwMin32Fx2 = 82182,   372     Iop_PwMin32Fx2 = 82182,
373     Iop_CmpEQ32Fx2 = 82183,   373     Iop_CmpEQ32Fx2 = 82183,
374     Iop_CmpGT32Fx2 = 82184,   374     Iop_CmpGT32Fx2 = 82184,
375     Iop_CmpGE32Fx2 = 82185,   375     Iop_CmpGE32Fx2 = 82185,
376     Iop_Recip32Fx2 = 82186,   376     Iop_Recip32Fx2 = 82186,
377     Iop_Recps32Fx2 = 82187,   377     Iop_Recps32Fx2 = 82187,
378     Iop_Rsqrte32Fx2 = 82188,   378     Iop_Rsqrte32Fx2 = 82188,
379     Iop_Rsqrts32Fx2 = 82189,   379     Iop_Rsqrts32Fx2 = 82189,
380     Iop_Neg32Fx2 = 82190,   380     Iop_Neg32Fx2 = 82190,
381     Iop_Abs32Fx2 = 82191,   381     Iop_Abs32Fx2 = 82191,
382     Iop_CmpNEZ8x8 = 82192,   382     Iop_CmpNEZ8x8 = 82192,
383     Iop_CmpNEZ16x4 = 82193,   383     Iop_CmpNEZ16x4 = 82193,
384     Iop_CmpNEZ32x2 = 82194,   384     Iop_CmpNEZ32x2 = 82194,
385     Iop_Add8x8 = 82195,   385     Iop_Add8x8 = 82195,
386     Iop_Add16x4 = 82196,   386     Iop_Add16x4 = 82196,
387     Iop_Add32x2 = 82197,   387     Iop_Add32x2 = 82197,
388     Iop_QAdd8Ux8 = 82198,   388     Iop_QAdd8Ux8 = 82198,
389     Iop_QAdd16Ux4 = 82199,   389     Iop_QAdd16Ux4 = 82199,
390     Iop_QAdd32Ux2 = 82200,   390     Iop_QAdd32Ux2 = 82200,
391     Iop_QAdd64Ux1 = 82201,   391     Iop_QAdd64Ux1 = 82201,
392     Iop_QAdd8Sx8 = 82202,   392     Iop_QAdd8Sx8 = 82202,
393     Iop_QAdd16Sx4 = 82203,   393     Iop_QAdd16Sx4 = 82203,
394     Iop_QAdd32Sx2 = 82204,   394     Iop_QAdd32Sx2 = 82204,
395     Iop_QAdd64Sx1 = 82205,   395     Iop_QAdd64Sx1 = 82205,
396     Iop_PwAdd8x8 = 82206,   396     Iop_PwAdd8x8 = 82206,
397     Iop_PwAdd16x4 = 82207,   397     Iop_PwAdd16x4 = 82207,
398     Iop_PwAdd32x2 = 82208,   398     Iop_PwAdd32x2 = 82208,
399     Iop_PwMax8Sx8 = 82209,   399     Iop_PwMax8Sx8 = 82209,
400     Iop_PwMax16Sx4 = 82210,   400     Iop_PwMax16Sx4 = 82210,
401     Iop_PwMax32Sx2 = 82211,   401     Iop_PwMax32Sx2 = 82211,
402     Iop_PwMax8Ux8 = 82212,   402     Iop_PwMax8Ux8 = 82212,
403     Iop_PwMax16Ux4 = 82213,   403     Iop_PwMax16Ux4 = 82213,
404     Iop_PwMax32Ux2 = 82214,   404     Iop_PwMax32Ux2 = 82214,
405     Iop_PwMin8Sx8 = 82215,   405     Iop_PwMin8Sx8 = 82215,
406     Iop_PwMin16Sx4 = 82216,   406     Iop_PwMin16Sx4 = 82216,
407     Iop_PwMin32Sx2 = 82217,   407     Iop_PwMin32Sx2 = 82217,
408     Iop_PwMin8Ux8 = 82218,   408     Iop_PwMin8Ux8 = 82218,
409     Iop_PwMin16Ux4 = 82219,   409     Iop_PwMin16Ux4 = 82219,
410     Iop_PwMin32Ux2 = 82220,   410     Iop_PwMin32Ux2 = 82220,
411     Iop_PwAddL8Ux8 = 82221,   411     Iop_PwAddL8Ux8 = 82221,
412     Iop_PwAddL16Ux4 = 82222,   412     Iop_PwAddL16Ux4 = 82222,
413     Iop_PwAddL32Ux2 = 82223,   413     Iop_PwAddL32Ux2 = 82223,
414     Iop_PwAddL8Sx8 = 82224,   414     Iop_PwAddL8Sx8 = 82224,
415     Iop_PwAddL16Sx4 = 82225,   415     Iop_PwAddL16Sx4 = 82225,
416     Iop_PwAddL32Sx2 = 82226,   416     Iop_PwAddL32Sx2 = 82226,
417     Iop_Sub8x8 = 82227,   417     Iop_Sub8x8 = 82227,
418     Iop_Sub16x4 = 82228,   418     Iop_Sub16x4 = 82228,
419     Iop_Sub32x2 = 82229,   419     Iop_Sub32x2 = 82229,
420     Iop_QSub8Ux8 = 82230,   420     Iop_QSub8Ux8 = 82230,
421     Iop_QSub16Ux4 = 82231,   421     Iop_QSub16Ux4 = 82231,
422     Iop_QSub32Ux2 = 82232,   422     Iop_QSub32Ux2 = 82232,
423     Iop_QSub64Ux1 = 82233,   423     Iop_QSub64Ux1 = 82233,
424     Iop_QSub8Sx8 = 82234,   424     Iop_QSub8Sx8 = 82234,
425     Iop_QSub16Sx4 = 82235,   425     Iop_QSub16Sx4 = 82235,
426     Iop_QSub32Sx2 = 82236,   426     Iop_QSub32Sx2 = 82236,
427     Iop_QSub64Sx1 = 82237,   427     Iop_QSub64Sx1 = 82237,
428     Iop_Abs8x8 = 82238,   428     Iop_Abs8x8 = 82238,
429     Iop_Abs16x4 = 82239,   429     Iop_Abs16x4 = 82239,
430     Iop_Abs32x2 = 82240,   430     Iop_Abs32x2 = 82240,
431     Iop_Mul8x8 = 82241,   431     Iop_Mul8x8 = 82241,
432     Iop_Mul16x4 = 82242,   432     Iop_Mul16x4 = 82242,
433     Iop_Mul32x2 = 82243,   433     Iop_Mul32x2 = 82243,
434     Iop_Mul32Fx2 = 82244,   434     Iop_Mul32Fx2 = 82244,
435     Iop_MulHi16Ux4 = 82245,   435     Iop_MulHi16Ux4 = 82245,
436     Iop_MulHi16Sx4 = 82246,   436     Iop_MulHi16Sx4 = 82246,
437     Iop_PolynomialMul8x8 = 82247,   437     Iop_PolynomialMul8x8 = 82247,
438     Iop_QDMulHi16Sx4 = 82248,   438     Iop_QDMulHi16Sx4 = 82248,
439     Iop_QDMulHi32Sx2 = 82249,   439     Iop_QDMulHi32Sx2 = 82249,
440     Iop_QRDMulHi16Sx4 = 82250,   440     Iop_QRDMulHi16Sx4 = 82250,
441     Iop_QRDMulHi32Sx2 = 82251,   441     Iop_QRDMulHi32Sx2 = 82251,
442     Iop_Avg8Ux8 = 82252,   442     Iop_Avg8Ux8 = 82252,
443     Iop_Avg16Ux4 = 82253,   443     Iop_Avg16Ux4 = 82253,
444     Iop_Max8Sx8 = 82254,   444     Iop_Max8Sx8 = 82254,
445     Iop_Max16Sx4 = 82255,   445     Iop_Max16Sx4 = 82255,
446     Iop_Max32Sx2 = 82256,   446     Iop_Max32Sx2 = 82256,
447     Iop_Max8Ux8 = 82257,   447     Iop_Max8Ux8 = 82257,
448     Iop_Max16Ux4 = 82258,   448     Iop_Max16Ux4 = 82258,
449     Iop_Max32Ux2 = 82259,   449     Iop_Max32Ux2 = 82259,
450     Iop_Min8Sx8 = 82260,   450     Iop_Min8Sx8 = 82260,
451     Iop_Min16Sx4 = 82261,   451     Iop_Min16Sx4 = 82261,
452     Iop_Min32Sx2 = 82262,   452     Iop_Min32Sx2 = 82262,
453     Iop_Min8Ux8 = 82263,   453     Iop_Min8Ux8 = 82263,
454     Iop_Min16Ux4 = 82264,   454     Iop_Min16Ux4 = 82264,
455     Iop_Min32Ux2 = 82265,   455     Iop_Min32Ux2 = 82265,
456     Iop_CmpEQ8x8 = 82266,   456     Iop_CmpEQ8x8 = 82266,
457     Iop_CmpEQ16x4 = 82267,   457     Iop_CmpEQ16x4 = 82267,
458     Iop_CmpEQ32x2 = 82268,   458     Iop_CmpEQ32x2 = 82268,
459     Iop_CmpGT8Ux8 = 82269,   459     Iop_CmpGT8Ux8 = 82269,
460     Iop_CmpGT16Ux4 = 82270,   460     Iop_CmpGT16Ux4 = 82270,
461     Iop_CmpGT32Ux2 = 82271,   461     Iop_CmpGT32Ux2 = 82271,
462     Iop_CmpGT8Sx8 = 82272,   462     Iop_CmpGT8Sx8 = 82272,
463     Iop_CmpGT16Sx4 = 82273,   463     Iop_CmpGT16Sx4 = 82273,
464     Iop_CmpGT32Sx2 = 82274,   464     Iop_CmpGT32Sx2 = 82274,
465     Iop_Cnt8x8 = 82275,   465     Iop_Cnt8x8 = 82275,
466     Iop_Clz8Sx8 = 82276,   466     Iop_Clz8Sx8 = 82276,
467     Iop_Clz16Sx4 = 82277,   467     Iop_Clz16Sx4 = 82277,
468     Iop_Clz32Sx2 = 82278,   468     Iop_Clz32Sx2 = 82278,
469     Iop_Cls8Sx8 = 82279,   469     Iop_Cls8Sx8 = 82279,
470     Iop_Cls16Sx4 = 82280,   470     Iop_Cls16Sx4 = 82280,
471     Iop_Cls32Sx2 = 82281,   471     Iop_Cls32Sx2 = 82281,
472     Iop_Shl8x8 = 82282,   472     Iop_Shl8x8 = 82282,
473     Iop_Shl16x4 = 82283,   473     Iop_Shl16x4 = 82283,
474     Iop_Shl32x2 = 82284,   474     Iop_Shl32x2 = 82284,
475     Iop_Shr8x8 = 82285,   475     Iop_Shr8x8 = 82285,
476     Iop_Shr16x4 = 82286,   476     Iop_Shr16x4 = 82286,
477     Iop_Shr32x2 = 82287,   477     Iop_Shr32x2 = 82287,
478     Iop_Sar8x8 = 82288,   478     Iop_Sar8x8 = 82288,
479     Iop_Sar16x4 = 82289,   479     Iop_Sar16x4 = 82289,
480     Iop_Sar32x2 = 82290,   480     Iop_Sar32x2 = 82290,
481     Iop_Sal8x8 = 82291,   481     Iop_Sal8x8 = 82291,
482     Iop_Sal16x4 = 82292,   482     Iop_Sal16x4 = 82292,
483     Iop_Sal32x2 = 82293,   483     Iop_Sal32x2 = 82293,
484     Iop_Sal64x1 = 82294,   484     Iop_Sal64x1 = 82294,
485     Iop_ShlN8x8 = 82295,   485     Iop_ShlN8x8 = 82295,
486     Iop_ShlN16x4 = 82296,   486     Iop_ShlN16x4 = 82296,
487     Iop_ShlN32x2 = 82297,   487     Iop_ShlN32x2 = 82297,
488     Iop_ShrN8x8 = 82298,   488     Iop_ShrN8x8 = 82298,
489     Iop_ShrN16x4 = 82299,   489     Iop_ShrN16x4 = 82299,
490     Iop_ShrN32x2 = 82300,   490     Iop_ShrN32x2 = 82300,
491     Iop_SarN8x8 = 82301,   491     Iop_SarN8x8 = 82301,
492     Iop_SarN16x4 = 82302,   492     Iop_SarN16x4 = 82302,
493     Iop_SarN32x2 = 82303,   493     Iop_SarN32x2 = 82303,
494     Iop_QShl8x8 = 82304,   494     Iop_QShl8x8 = 82304,
495     Iop_QShl16x4 = 82305,   495     Iop_QShl16x4 = 82305,
496     Iop_QShl32x2 = 82306,   496     Iop_QShl32x2 = 82306,
497     Iop_QShl64x1 = 82307,   497     Iop_QShl64x1 = 82307,
498     Iop_QSal8x8 = 82308,   498     Iop_QSal8x8 = 82308,
499     Iop_QSal16x4 = 82309,   499     Iop_QSal16x4 = 82309,
500     Iop_QSal32x2 = 82310,   500     Iop_QSal32x2 = 82310,
501     Iop_QSal64x1 = 82311,   501     Iop_QSal64x1 = 82311,
502     Iop_QShlN8Sx8 = 82312,   502     Iop_QShlN8Sx8 = 82312,
503     Iop_QShlN16Sx4 = 82313,   503     Iop_QShlN16Sx4 = 82313,
504     Iop_QShlN32Sx2 = 82314,   504     Iop_QShlN32Sx2 = 82314,
505     Iop_QShlN64Sx1 = 82315,   505     Iop_QShlN64Sx1 = 82315,
506     Iop_QShlN8x8 = 82316,   506     Iop_QShlN8x8 = 82316,
507     Iop_QShlN16x4 = 82317,   507     Iop_QShlN16x4 = 82317,
508     Iop_QShlN32x2 = 82318,   508     Iop_QShlN32x2 = 82318,
509     Iop_QShlN64x1 = 82319,   509     Iop_QShlN64x1 = 82319,
510     Iop_QSalN8x8 = 82320,   510     Iop_QSalN8x8 = 82320,
511     Iop_QSalN16x4 = 82321,   511     Iop_QSalN16x4 = 82321,
512     Iop_QSalN32x2 = 82322,   512     Iop_QSalN32x2 = 82322,
513     Iop_QSalN64x1 = 82323,   513     Iop_QSalN64x1 = 82323,
514     Iop_QNarrow16Ux4 = 82324,   514     Iop_QNarrow16Ux4 = 82324,
515     Iop_QNarrow16Sx4 = 82325,   515     Iop_QNarrow16Sx4 = 82325,
516     Iop_QNarrow32Sx2 = 82326,   516     Iop_QNarrow32Sx2 = 82326,
517     Iop_InterleaveHI8x8 = 82327,   517     Iop_InterleaveHI8x8 = 82327,
518     Iop_InterleaveHI16x4 = 82328,   518     Iop_InterleaveHI16x4 = 82328,
519     Iop_InterleaveHI32x2 = 82329,   519     Iop_InterleaveHI32x2 = 82329,
520     Iop_InterleaveLO8x8 = 82330,   520     Iop_InterleaveLO8x8 = 82330,
521     Iop_InterleaveLO16x4 = 82331,   521     Iop_InterleaveLO16x4 = 82331,
522     Iop_InterleaveLO32x2 = 82332,   522     Iop_InterleaveLO32x2 = 82332,
523     Iop_InterleaveOddLanes8x8 = 82333,   523     Iop_InterleaveOddLanes8x8 = 82333,
524     Iop_InterleaveEvenLanes8x8 = 82334,   524     Iop_InterleaveEvenLanes8x8 = 82334,
525     Iop_InterleaveOddLanes16x4 = 82335,   525     Iop_InterleaveOddLanes16x4 = 82335,
526     Iop_InterleaveEvenLanes16x4 = 82336,   526     Iop_InterleaveEvenLanes16x4 = 82336,
527     Iop_CatOddLanes8x8 = 82337,   527     Iop_CatOddLanes8x8 = 82337,
528     Iop_CatOddLanes16x4 = 82338,   528     Iop_CatOddLanes16x4 = 82338,
529     Iop_CatEvenLanes8x8 = 82339,   529     Iop_CatEvenLanes8x8 = 82339,
530     Iop_CatEvenLanes16x4 = 82340,   530     Iop_CatEvenLanes16x4 = 82340,
531     Iop_GetElem8x8 = 82341,   531     Iop_GetElem8x8 = 82341,
532     Iop_GetElem16x4 = 82342,   532     Iop_GetElem16x4 = 82342,
533     Iop_GetElem32x2 = 82343,   533     Iop_GetElem32x2 = 82343,
534     Iop_SetElem8x8 = 82344,   534     Iop_SetElem8x8 = 82344,
535     Iop_SetElem16x4 = 82345,   535     Iop_SetElem16x4 = 82345,
536     Iop_SetElem32x2 = 82346,   536     Iop_SetElem32x2 = 82346,
537     Iop_Dup8x8 = 82347,   537     Iop_Dup8x8 = 82347,
538     Iop_Dup16x4 = 82348,   538     Iop_Dup16x4 = 82348,
539     Iop_Dup32x2 = 82349,   539     Iop_Dup32x2 = 82349,
540     Iop_Extract64 = 82350,   540     Iop_Extract64 = 82350,
541     Iop_Reverse16_8x8 = 82351,   541     Iop_Reverse16_8x8 = 82351,
542     Iop_Reverse32_8x8 = 82352,   542     Iop_Reverse32_8x8 = 82352,
543     Iop_Reverse32_16x4 = 82353,   543     Iop_Reverse32_16x4 = 82353,
544     Iop_Reverse64_8x8 = 82354,   544     Iop_Reverse64_8x8 = 82354,
545     Iop_Reverse64_16x4 = 82355,   545     Iop_Reverse64_16x4 = 82355,
546     Iop_Reverse64_32x2 = 82356,   546     Iop_Reverse64_32x2 = 82356,
547     Iop_Perm8x8 = 82357,   547     Iop_Perm8x8 = 82357,
548     Iop_Recip32x2 = 82358,   548     Iop_Recip32x2 = 82358,
549     Iop_Rsqrte32x2 = 82359,   549     Iop_Rsqrte32x2 = 82359,
550     Iop_Add32Fx4 = 82360,   550     Iop_Add32Fx4 = 82360,
551     Iop_Sub32Fx4 = 82361,   551     Iop_Sub32Fx4 = 82361,
552     Iop_Mul32Fx4 = 82362,   552     Iop_Mul32Fx4 = 82362,
553     Iop_Div32Fx4 = 82363,   553     Iop_Div32Fx4 = 82363,
554     Iop_Max32Fx4 = 82364,   554     Iop_Max32Fx4 = 82364,
555     Iop_Min32Fx4 = 82365,   555     Iop_Min32Fx4 = 82365,
556     Iop_Add32Fx2 = 82366,   556     Iop_Add32Fx2 = 82366,
557     Iop_Sub32Fx2 = 82367,   557     Iop_Sub32Fx2 = 82367,
558     Iop_CmpEQ32Fx4 = 82368,   558     Iop_CmpEQ32Fx4 = 82368,
559     Iop_CmpLT32Fx4 = 82369,   559     Iop_CmpLT32Fx4 = 82369,
560     Iop_CmpLE32Fx4 = 82370,   560     Iop_CmpLE32Fx4 = 82370,
561     Iop_CmpUN32Fx4 = 82371,   561     Iop_CmpUN32Fx4 = 82371,
562     Iop_CmpGT32Fx4 = 82372,   562     Iop_CmpGT32Fx4 = 82372,
563     Iop_CmpGE32Fx4 = 82373,   563     Iop_CmpGE32Fx4 = 82373,
564     Iop_Abs32Fx4 = 82374,   564     Iop_Abs32Fx4 = 82374,
565     Iop_PwMax32Fx4 = 82375,   565     Iop_PwMax32Fx4 = 82375,
566     Iop_PwMin32Fx4 = 82376,   566     Iop_PwMin32Fx4 = 82376,
567     Iop_Sqrt32Fx4 = 82377,   567     Iop_Sqrt32Fx4 = 82377,
568     Iop_RSqrt32Fx4 = 82378,   568     Iop_RSqrt32Fx4 = 82378,
569     Iop_Neg32Fx4 = 82379,   569     Iop_Neg32Fx4 = 82379,
570     Iop_Recip32Fx4 = 82380,   570     Iop_Recip32Fx4 = 82380,
571     Iop_Recps32Fx4 = 82381,   571     Iop_Recps32Fx4 = 82381,
572     Iop_Rsqrte32Fx4 = 82382,   572     Iop_Rsqrte32Fx4 = 82382,
573     Iop_Rsqrts32Fx4 = 82383,   573     Iop_Rsqrts32Fx4 = 82383,
574     Iop_I32UtoFx4 = 82384,   574     Iop_I32UtoFx4 = 82384,
575     Iop_I32StoFx4 = 82385,   575     Iop_I32StoFx4 = 82385,
576     Iop_FtoI32Ux4_RZ = 82386,   576     Iop_FtoI32Ux4_RZ = 82386,
577     Iop_FtoI32Sx4_RZ = 82387,   577     Iop_FtoI32Sx4_RZ = 82387,
578     Iop_QFtoI32Ux4_RZ = 82388,   578     Iop_QFtoI32Ux4_RZ = 82388,
579     Iop_QFtoI32Sx4_RZ = 82389,   579     Iop_QFtoI32Sx4_RZ = 82389,
580     Iop_RoundF32x4_RM = 82390,   580     Iop_RoundF32x4_RM = 82390,
581     Iop_RoundF32x4_RP = 82391,   581     Iop_RoundF32x4_RP = 82391,
582     Iop_RoundF32x4_RN = 82392,   582     Iop_RoundF32x4_RN = 82392,
583     Iop_RoundF32x4_RZ = 82393,   583     Iop_RoundF32x4_RZ = 82393,
584     Iop_F32ToFixed32Ux4_RZ = 82394,   584     Iop_F32ToFixed32Ux4_RZ = 82394,
585     Iop_F32ToFixed32Sx4_RZ = 82395,   585     Iop_F32ToFixed32Sx4_RZ = 82395,
586     Iop_Fixed32UToF32x4_RN = 82396,   586     Iop_Fixed32UToF32x4_RN = 82396,
587     Iop_Fixed32SToF32x4_RN = 82397,   587     Iop_Fixed32SToF32x4_RN = 82397,
588     Iop_F32toF16x4 = 82398,   588     Iop_F32toF16x4 = 82398,
589     Iop_F16toF32x4 = 82399,   589     Iop_F16toF32x4 = 82399,
590     Iop_Add32F0x4 = 82400,   590     Iop_Add32F0x4 = 82400,
591     Iop_Sub32F0x4 = 82401,   591     Iop_Sub32F0x4 = 82401,
592     Iop_Mul32F0x4 = 82402,   592     Iop_Mul32F0x4 = 82402,
593     Iop_Div32F0x4 = 82403,   593     Iop_Div32F0x4 = 82403,
594     Iop_Max32F0x4 = 82404,   594     Iop_Max32F0x4 = 82404,
595     Iop_Min32F0x4 = 82405,   595     Iop_Min32F0x4 = 82405,
596     Iop_CmpEQ32F0x4 = 82406,   596     Iop_CmpEQ32F0x4 = 82406,
597     Iop_CmpLT32F0x4 = 82407,   597     Iop_CmpLT32F0x4 = 82407,
598     Iop_CmpLE32F0x4 = 82408,   598     Iop_CmpLE32F0x4 = 82408,
599     Iop_CmpUN32F0x4 = 82409,   599     Iop_CmpUN32F0x4 = 82409,
600     Iop_Recip32F0x4 = 82410,   600     Iop_Recip32F0x4 = 82410,
601     Iop_Sqrt32F0x4 = 82411,   601     Iop_Sqrt32F0x4 = 82411,
602     Iop_RSqrt32F0x4 = 82412,   602     Iop_RSqrt32F0x4 = 82412,
603     Iop_Add64Fx2 = 82413,   603     Iop_Add64Fx2 = 82413,
604     Iop_Sub64Fx2 = 82414,   604     Iop_Sub64Fx2 = 82414,
605     Iop_Mul64Fx2 = 82415,   605     Iop_Mul64Fx2 = 82415,
606     Iop_Div64Fx2 = 82416,   606     Iop_Div64Fx2 = 82416,
607     Iop_Max64Fx2 = 82417,   607     Iop_Max64Fx2 = 82417,
608     Iop_Min64Fx2 = 82418,   608     Iop_Min64Fx2 = 82418,
609     Iop_CmpEQ64Fx2 = 82419,   609     Iop_CmpEQ64Fx2 = 82419,
610     Iop_CmpLT64Fx2 = 82420,   610     Iop_CmpLT64Fx2 = 82420,
611     Iop_CmpLE64Fx2 = 82421,   611     Iop_CmpLE64Fx2 = 82421,
612     Iop_CmpUN64Fx2 = 82422,   612     Iop_CmpUN64Fx2 = 82422,
613     Iop_Recip64Fx2 = 82423,   613     Iop_Recip64Fx2 = 82423,
614     Iop_Sqrt64Fx2 = 82424,   614     Iop_Sqrt64Fx2 = 82424,
615     Iop_RSqrt64Fx2 = 82425,   615     Iop_RSqrt64Fx2 = 82425,
616     Iop_Add64F0x2 = 82426,   616     Iop_Add64F0x2 = 82426,
617     Iop_Sub64F0x2 = 82427,   617     Iop_Sub64F0x2 = 82427,
618     Iop_Mul64F0x2 = 82428,   618     Iop_Mul64F0x2 = 82428,
619     Iop_Div64F0x2 = 82429,   619     Iop_Div64F0x2 = 82429,
620     Iop_Max64F0x2 = 82430,   620     Iop_Max64F0x2 = 82430,
621     Iop_Min64F0x2 = 82431,   621     Iop_Min64F0x2 = 82431,
622     Iop_CmpEQ64F0x2 = 82432,   622     Iop_CmpEQ64F0x2 = 82432,
623     Iop_CmpLT64F0x2 = 82433,   623     Iop_CmpLT64F0x2 = 82433,
624     Iop_CmpLE64F0x2 = 82434,   624     Iop_CmpLE64F0x2 = 82434,
625     Iop_CmpUN64F0x2 = 82435,   625     Iop_CmpUN64F0x2 = 82435,
626     Iop_Recip64F0x2 = 82436,   626     Iop_Recip64F0x2 = 82436,
627     Iop_Sqrt64F0x2 = 82437,   627     Iop_Sqrt64F0x2 = 82437,
628     Iop_RSqrt64F0x2 = 82438,   628     Iop_RSqrt64F0x2 = 82438,
629     Iop_V128to64 = 82439,   629     Iop_V128to64 = 82439,
630     Iop_V128HIto64 = 82440,   630     Iop_V128HIto64 = 82440,
631     Iop_64HLtoV128 = 82441,   631     Iop_64HLtoV128 = 82441,
632     Iop_64UtoV128 = 82442,   632     Iop_64UtoV128 = 82442,
633     Iop_SetV128lo64 = 82443,   633     Iop_SetV128lo64 = 82443,
634     Iop_32UtoV128 = 82444,   634     Iop_32UtoV128 = 82444,
635     Iop_V128to32 = 82445,   635     Iop_V128to32 = 82445,
636     Iop_SetV128lo32 = 82446,   636     Iop_SetV128lo32 = 82446,
637     Iop_NotV128 = 82447,   637     Iop_NotV128 = 82447,
638     Iop_AndV128 = 82448,   638     Iop_AndV128 = 82448,
639     Iop_OrV128 = 82449,   639     Iop_OrV128 = 82449,
640     Iop_XorV128 = 82450,   640     Iop_XorV128 = 82450,
641     Iop_ShlV128 = 82451,   641     Iop_ShlV128 = 82451,
642     Iop_ShrV128 = 82452,   642     Iop_ShrV128 = 82452,
643     Iop_CmpNEZ8x16 = 82453,   643     Iop_CmpNEZ8x16 = 82453,
644     Iop_CmpNEZ16x8 = 82454,   644     Iop_CmpNEZ16x8 = 82454,
645     Iop_CmpNEZ32x4 = 82455,   645     Iop_CmpNEZ32x4 = 82455,
646     Iop_CmpNEZ64x2 = 82456,   646     Iop_CmpNEZ64x2 = 82456,
647     Iop_Add8x16 = 82457,   647     Iop_Add8x16 = 82457,
648     Iop_Add16x8 = 82458,   648     Iop_Add16x8 = 82458,
649     Iop_Add32x4 = 82459,   649     Iop_Add32x4 = 82459,
650     Iop_Add64x2 = 82460,   650     Iop_Add64x2 = 82460,
651     Iop_QAdd8Ux16 = 82461,   651     Iop_QAdd8Ux16 = 82461,
652     Iop_QAdd16Ux8 = 82462,   652     Iop_QAdd16Ux8 = 82462,
653     Iop_QAdd32Ux4 = 82463,   653     Iop_QAdd32Ux4 = 82463,
654     Iop_QAdd64Ux2 = 82464,   654     Iop_QAdd64Ux2 = 82464,
655     Iop_QAdd8Sx16 = 82465,   655     Iop_QAdd8Sx16 = 82465,
656     Iop_QAdd16Sx8 = 82466,   656     Iop_QAdd16Sx8 = 82466,
657     Iop_QAdd32Sx4 = 82467,   657     Iop_QAdd32Sx4 = 82467,
658     Iop_QAdd64Sx2 = 82468,   658     Iop_QAdd64Sx2 = 82468,
659     Iop_Sub8x16 = 82469,   659     Iop_Sub8x16 = 82469,
660     Iop_Sub16x8 = 82470,   660     Iop_Sub16x8 = 82470,
661     Iop_Sub32x4 = 82471,   661     Iop_Sub32x4 = 82471,
662     Iop_Sub64x2 = 82472,   662     Iop_Sub64x2 = 82472,
663     Iop_QSub8Ux16 = 82473,   663     Iop_QSub8Ux16 = 82473,
664     Iop_QSub16Ux8 = 82474,   664     Iop_QSub16Ux8 = 82474,
665     Iop_QSub32Ux4 = 82475,   665     Iop_QSub32Ux4 = 82475,
666     Iop_QSub64Ux2 = 82476,   666     Iop_QSub64Ux2 = 82476,
667     Iop_QSub8Sx16 = 82477,   667     Iop_QSub8Sx16 = 82477,
668     Iop_QSub16Sx8 = 82478,   668     Iop_QSub16Sx8 = 82478,
669     Iop_QSub32Sx4 = 82479,   669     Iop_QSub32Sx4 = 82479,
670     Iop_QSub64Sx2 = 82480,   670     Iop_QSub64Sx2 = 82480,
671     Iop_Mul8x16 = 82481,   671     Iop_Mul8x16 = 82481,
672     Iop_Mul16x8 = 82482,   672     Iop_Mul16x8 = 82482,
673     Iop_Mul32x4 = 82483,   673     Iop_Mul32x4 = 82483,
674     Iop_MulHi16Ux8 = 82484,   674     Iop_MulHi16Ux8 = 82484,
675     Iop_MulHi32Ux4 = 82485,   675     Iop_MulHi32Ux4 = 82485,
676     Iop_MulHi16Sx8 = 82486,   676     Iop_MulHi16Sx8 = 82486,
677     Iop_MulHi32Sx4 = 82487,   677     Iop_MulHi32Sx4 = 82487,
678     Iop_MullEven8Ux16 = 82488,   678     Iop_MullEven8Ux16 = 82488,
679     Iop_MullEven16Ux8 = 82489,   679     Iop_MullEven16Ux8 = 82489,
680     Iop_MullEven8Sx16 = 82490,   680     Iop_MullEven8Sx16 = 82490,
681     Iop_MullEven16Sx8 = 82491,   681     Iop_MullEven16Sx8 = 82491,
682     Iop_Mull8Ux8 = 82492,   682     Iop_Mull8Ux8 = 82492,
683     Iop_Mull8Sx8 = 82493,   683     Iop_Mull8Sx8 = 82493,
684     Iop_Mull16Ux4 = 82494,   684     Iop_Mull16Ux4 = 82494,
685     Iop_Mull16Sx4 = 82495,   685     Iop_Mull16Sx4 = 82495,
686     Iop_Mull32Ux2 = 82496,   686     Iop_Mull32Ux2 = 82496,
687     Iop_Mull32Sx2 = 82497,   687     Iop_Mull32Sx2 = 82497,
688     Iop_QDMulHi16Sx8 = 82498,   688     Iop_QDMulHi16Sx8 = 82498,
689     Iop_QDMulHi32Sx4 = 82499,   689     Iop_QDMulHi32Sx4 = 82499,
690     Iop_QRDMulHi16Sx8 = 82500,   690     Iop_QRDMulHi16Sx8 = 82500,
691     Iop_QRDMulHi32Sx4 = 82501,   691     Iop_QRDMulHi32Sx4 = 82501,
692     Iop_QDMulLong16Sx4 = 82502,   692     Iop_QDMulLong16Sx4 = 82502,
693     Iop_QDMulLong32Sx2 = 82503,   693     Iop_QDMulLong32Sx2 = 82503,
694     Iop_PolynomialMul8x16 = 82504,   694     Iop_PolynomialMul8x16 = 82504,
695     Iop_PolynomialMull8x8 = 82505,   695     Iop_PolynomialMull8x8 = 82505,
696     Iop_PwAdd8x16 = 82506,   696     Iop_PwAdd8x16 = 82506,
697     Iop_PwAdd16x8 = 82507,   697     Iop_PwAdd16x8 = 82507,
698     Iop_PwAdd32x4 = 82508,   698     Iop_PwAdd32x4 = 82508,
699     Iop_PwAdd32Fx2 = 82509,   699     Iop_PwAdd32Fx2 = 82509,
700     Iop_PwAddL8Ux16 = 82510,   700     Iop_PwAddL8Ux16 = 82510,
701     Iop_PwAddL16Ux8 = 82511,   701     Iop_PwAddL16Ux8 = 82511,
702     Iop_PwAddL32Ux4 = 82512,   702     Iop_PwAddL32Ux4 = 82512,
703     Iop_PwAddL8Sx16 = 82513,   703     Iop_PwAddL8Sx16 = 82513,
704     Iop_PwAddL16Sx8 = 82514,   704     Iop_PwAddL16Sx8 = 82514,
705     Iop_PwAddL32Sx4 = 82515,   705     Iop_PwAddL32Sx4 = 82515,
706     Iop_Abs8x16 = 82516,   706     Iop_Abs8x16 = 82516,
707     Iop_Abs16x8 = 82517,   707     Iop_Abs16x8 = 82517,
708     Iop_Abs32x4 = 82518,   708     Iop_Abs32x4 = 82518,
709     Iop_Avg8Ux16 = 82519,   709     Iop_Avg8Ux16 = 82519,
710     Iop_Avg16Ux8 = 82520,   710     Iop_Avg16Ux8 = 82520,
711     Iop_Avg32Ux4 = 82521,   711     Iop_Avg32Ux4 = 82521,
712     Iop_Avg8Sx16 = 82522,   712     Iop_Avg8Sx16 = 82522,
713     Iop_Avg16Sx8 = 82523,   713     Iop_Avg16Sx8 = 82523,
714     Iop_Avg32Sx4 = 82524,   714     Iop_Avg32Sx4 = 82524,
715     Iop_Max8Sx16 = 82525,   715     Iop_Max8Sx16 = 82525,
716     Iop_Max16Sx8 = 82526,   716     Iop_Max16Sx8 = 82526,
717     Iop_Max32Sx4 = 82527,   717     Iop_Max32Sx4 = 82527,
718     Iop_Max8Ux16 = 82528,   718     Iop_Max8Ux16 = 82528,
719     Iop_Max16Ux8 = 82529,   719     Iop_Max16Ux8 = 82529,
720     Iop_Max32Ux4 = 82530,   720     Iop_Max32Ux4 = 82530,
721     Iop_Min8Sx16 = 82531,   721     Iop_Min8Sx16 = 82531,
722     Iop_Min16Sx8 = 82532,   722     Iop_Min16Sx8 = 82532,
723     Iop_Min32Sx4 = 82533,   723     Iop_Min32Sx4 = 82533,
724     Iop_Min8Ux16 = 82534,   724     Iop_Min8Ux16 = 82534,
725     Iop_Min16Ux8 = 82535,   725     Iop_Min16Ux8 = 82535,
726     Iop_Min32Ux4 = 82536,   726     Iop_Min32Ux4 = 82536,
727     Iop_CmpEQ8x16 = 82537,   727     Iop_CmpEQ8x16 = 82537,
728     Iop_CmpEQ16x8 = 82538,   728     Iop_CmpEQ16x8 = 82538,
729     Iop_CmpEQ32x4 = 82539,   729     Iop_CmpEQ32x4 = 82539,
730     Iop_CmpGT8Sx16 = 82540,   730     Iop_CmpGT8Sx16 = 82540,
731     Iop_CmpGT16Sx8 = 82541,   731     Iop_CmpGT16Sx8 = 82541,
732     Iop_CmpGT32Sx4 = 82542,   732     Iop_CmpGT32Sx4 = 82542,
733     Iop_CmpGT64Sx2 = 82543,   733     Iop_CmpGT64Sx2 = 82543,
734     Iop_CmpGT8Ux16 = 82544,   734     Iop_CmpGT8Ux16 = 82544,
735     Iop_CmpGT16Ux8 = 82545,   735     Iop_CmpGT16Ux8 = 82545,
736     Iop_CmpGT32Ux4 = 82546,   736     Iop_CmpGT32Ux4 = 82546,
737     Iop_Cnt8x16 = 82547,   737     Iop_Cnt8x16 = 82547,
738     Iop_Clz8Sx16 = 82548,   738     Iop_Clz8Sx16 = 82548,
739     Iop_Clz16Sx8 = 82549,   739     Iop_Clz16Sx8 = 82549,
740     Iop_Clz32Sx4 = 82550,   740     Iop_Clz32Sx4 = 82550,
741     Iop_Cls8Sx16 = 82551,   741     Iop_Cls8Sx16 = 82551,
742     Iop_Cls16Sx8 = 82552,   742     Iop_Cls16Sx8 = 82552,
743     Iop_Cls32Sx4 = 82553,   743     Iop_Cls32Sx4 = 82553,
744     Iop_ShlN8x16 = 82554,   744     Iop_ShlN8x16 = 82554,
745     Iop_ShlN16x8 = 82555,   745     Iop_ShlN16x8 = 82555,
746     Iop_ShlN32x4 = 82556,   746     Iop_ShlN32x4 = 82556,
747     Iop_ShlN64x2 = 82557,   747     Iop_ShlN64x2 = 82557,
748     Iop_ShrN8x16 = 82558,   748     Iop_ShrN8x16 = 82558,
749     Iop_ShrN16x8 = 82559,   749     Iop_ShrN16x8 = 82559,
750     Iop_ShrN32x4 = 82560,   750     Iop_ShrN32x4 = 82560,
751     Iop_ShrN64x2 = 82561,   751     Iop_ShrN64x2 = 82561,
752     Iop_SarN8x16 = 82562,   752     Iop_SarN8x16 = 82562,
753     Iop_SarN16x8 = 82563,   753     Iop_SarN16x8 = 82563,
754     Iop_SarN32x4 = 82564,   754     Iop_SarN32x4 = 82564,
755     Iop_SarN64x2 = 82565,   755     Iop_SarN64x2 = 82565,
756     Iop_Shl8x16 = 82566,   756     Iop_Shl8x16 = 82566,
757     Iop_Shl16x8 = 82567,   757     Iop_Shl16x8 = 82567,
758     Iop_Shl32x4 = 82568,   758     Iop_Shl32x4 = 82568,
759     Iop_Shl64x2 = 82569,   759     Iop_Shl64x2 = 82569,
760     Iop_Shr8x16 = 82570,   760     Iop_Shr8x16 = 82570,
761     Iop_Shr16x8 = 82571,   761     Iop_Shr16x8 = 82571,
762     Iop_Shr32x4 = 82572,   762     Iop_Shr32x4 = 82572,
763     Iop_Shr64x2 = 82573,   763     Iop_Shr64x2 = 82573,
764     Iop_Sar8x16 = 82574,   764     Iop_Sar8x16 = 82574,
765     Iop_Sar16x8 = 82575,   765     Iop_Sar16x8 = 82575,
766     Iop_Sar32x4 = 82576,   766     Iop_Sar32x4 = 82576,
767     Iop_Sar64x2 = 82577,   767     Iop_Sar64x2 = 82577,
768     Iop_Sal8x16 = 82578,   768     Iop_Sal8x16 = 82578,
769     Iop_Sal16x8 = 82579,   769     Iop_Sal16x8 = 82579,
770     Iop_Sal32x4 = 82580,   770     Iop_Sal32x4 = 82580,
771     Iop_Sal64x2 = 82581,   771     Iop_Sal64x2 = 82581,
772     Iop_Rol8x16 = 82582,   772     Iop_Rol8x16 = 82582,
773     Iop_Rol16x8 = 82583,   773     Iop_Rol16x8 = 82583,
774     Iop_Rol32x4 = 82584,   774     Iop_Rol32x4 = 82584,
775     Iop_QShl8x16 = 82585,   775     Iop_QShl8x16 = 82585,
776     Iop_QShl16x8 = 82586,   776     Iop_QShl16x8 = 82586,
777     Iop_QShl32x4 = 82587,   777     Iop_QShl32x4 = 82587,
778     Iop_QShl64x2 = 82588,   778     Iop_QShl64x2 = 82588,
779     Iop_QSal8x16 = 82589,   779     Iop_QSal8x16 = 82589,
780     Iop_QSal16x8 = 82590,   780     Iop_QSal16x8 = 82590,
781     Iop_QSal32x4 = 82591,   781     Iop_QSal32x4 = 82591,
782     Iop_QSal64x2 = 82592,   782     Iop_QSal64x2 = 82592,
783     Iop_QShlN8Sx16 = 82593,   783     Iop_QShlN8Sx16 = 82593,
784     Iop_QShlN16Sx8 = 82594,   784     Iop_QShlN16Sx8 = 82594,
785     Iop_QShlN32Sx4 = 82595,   785     Iop_QShlN32Sx4 = 82595,
786     Iop_QShlN64Sx2 = 82596,   786     Iop_QShlN64Sx2 = 82596,
787     Iop_QShlN8x16 = 82597,   787     Iop_QShlN8x16 = 82597,
788     Iop_QShlN16x8 = 82598,   788     Iop_QShlN16x8 = 82598,
789     Iop_QShlN32x4 = 82599,   789     Iop_QShlN32x4 = 82599,
790     Iop_QShlN64x2 = 82600,   790     Iop_QShlN64x2 = 82600,
791     Iop_QSalN8x16 = 82601,   791     Iop_QSalN8x16 = 82601,
792     Iop_QSalN16x8 = 82602,   792     Iop_QSalN16x8 = 82602,
793     Iop_QSalN32x4 = 82603,   793     Iop_QSalN32x4 = 82603,
794     Iop_QSalN64x2 = 82604,   794     Iop_QSalN64x2 = 82604,
795     Iop_QNarrow16Ux8 = 82605,   795     Iop_QNarrow16Ux8 = 82605,
796     Iop_QNarrow32Ux4 = 82606,   796     Iop_QNarrow32Ux4 = 82606,
797     Iop_QNarrow16Sx8 = 82607,   797     Iop_QNarrow16Sx8 = 82607,
798     Iop_QNarrow32Sx4 = 82608,   798     Iop_QNarrow32Sx4 = 82608,
799     Iop_Narrow16x8 = 82609,   799     Iop_Narrow16x8 = 82609,
800     Iop_Narrow32x4 = 82610,   800     Iop_Narrow32x4 = 82610,
801     Iop_Shorten16x8 = 82611,   801     Iop_Shorten16x8 = 82611,
802     Iop_Shorten32x4 = 82612,   802     Iop_Shorten32x4 = 82612,
803     Iop_Shorten64x2 = 82613,   803     Iop_Shorten64x2 = 82613,
804     Iop_QShortenS16Sx8 = 82614,   804     Iop_QShortenS16Sx8 = 82614,
805     Iop_QShortenS32Sx4 = 82615,   805     Iop_QShortenS32Sx4 = 82615,
806     Iop_QShortenS64Sx2 = 82616,   806     Iop_QShortenS64Sx2 = 82616,
807     Iop_QShortenU16Sx8 = 82617,   807     Iop_QShortenU16Sx8 = 82617,
808     Iop_QShortenU32Sx4 = 82618,   808     Iop_QShortenU32Sx4 = 82618,
809     Iop_QShortenU64Sx2 = 82619,   809     Iop_QShortenU64Sx2 = 82619,
810     Iop_QShortenU16Ux8 = 82620,   810     Iop_QShortenU16Ux8 = 82620,
811     Iop_QShortenU32Ux4 = 82621,   811     Iop_QShortenU32Ux4 = 82621,
812     Iop_QShortenU64Ux2 = 82622,   812     Iop_QShortenU64Ux2 = 82622,
813     Iop_Longen8Ux8 = 82623,   813     Iop_Longen8Ux8 = 82623,
814     Iop_Longen16Ux4 = 82624,   814     Iop_Longen16Ux4 = 82624,
815     Iop_Longen32Ux2 = 82625,   815     Iop_Longen32Ux2 = 82625,
816     Iop_Longen8Sx8 = 82626,   816     Iop_Longen8Sx8 = 82626,
817     Iop_Longen16Sx4 = 82627,   817     Iop_Longen16Sx4 = 82627,
818     Iop_Longen32Sx2 = 82628,   818     Iop_Longen32Sx2 = 82628,
819     Iop_InterleaveHI8x16 = 82629,   819     Iop_InterleaveHI8x16 = 82629,
820     Iop_InterleaveHI16x8 = 82630,   820     Iop_InterleaveHI16x8 = 82630,
821     Iop_InterleaveHI32x4 = 82631,   821     Iop_InterleaveHI32x4 = 82631,
822     Iop_InterleaveHI64x2 = 82632,   822     Iop_InterleaveHI64x2 = 82632,
823     Iop_InterleaveLO8x16 = 82633,   823     Iop_InterleaveLO8x16 = 82633,
824     Iop_InterleaveLO16x8 = 82634,   824     Iop_InterleaveLO16x8 = 82634,
825     Iop_InterleaveLO32x4 = 82635,   825     Iop_InterleaveLO32x4 = 82635,
826     Iop_InterleaveLO64x2 = 82636,   826     Iop_InterleaveLO64x2 = 82636,
827     Iop_InterleaveOddLanes8x16 = 82637,   827     Iop_InterleaveOddLanes8x16 = 82637,
828     Iop_InterleaveEvenLanes8x16 = 82638,   828     Iop_InterleaveEvenLanes8x16 = 82638,
829     Iop_InterleaveOddLanes16x8 = 82639,   829     Iop_InterleaveOddLanes16x8 = 82639,
830     Iop_InterleaveEvenLanes16x8 = 82640,   830     Iop_InterleaveEvenLanes16x8 = 82640,
831     Iop_InterleaveOddLanes32x4 = 82641,   831     Iop_InterleaveOddLanes32x4 = 82641,
832     Iop_InterleaveEvenLanes32x4 = 82642,   832     Iop_InterleaveEvenLanes32x4 = 82642,
833     Iop_CatOddLanes8x16 = 82643,   833     Iop_CatOddLanes8x16 = 82643,
834     Iop_CatOddLanes16x8 = 82644,   834     Iop_CatOddLanes16x8 = 82644,
835     Iop_CatOddLanes32x4 = 82645,   835     Iop_CatOddLanes32x4 = 82645,
836     Iop_CatEvenLanes8x16 = 82646,   836     Iop_CatEvenLanes8x16 = 82646,
837     Iop_CatEvenLanes16x8 = 82647,   837     Iop_CatEvenLanes16x8 = 82647,
838     Iop_CatEvenLanes32x4 = 82648,   838     Iop_CatEvenLanes32x4 = 82648,
839     Iop_GetElem8x16 = 82649,   839     Iop_GetElem8x16 = 82649,
840     Iop_GetElem16x8 = 82650,   840     Iop_GetElem16x8 = 82650,
841     Iop_GetElem32x4 = 82651,   841     Iop_GetElem32x4 = 82651,
842     Iop_GetElem64x2 = 82652,   842     Iop_GetElem64x2 = 82652,
843     Iop_Dup8x16 = 82653,   843     Iop_Dup8x16 = 82653,
844     Iop_Dup16x8 = 82654,   844     Iop_Dup16x8 = 82654,
845     Iop_Dup32x4 = 82655,   845     Iop_Dup32x4 = 82655,
846     Iop_ExtractV128 = 82656,   846     Iop_ExtractV128 = 82656,
847     Iop_Reverse16_8x16 = 82657,   847     Iop_Reverse16_8x16 = 82657,
848     Iop_Reverse32_8x16 = 82658,   848     Iop_Reverse32_8x16 = 82658,
849     Iop_Reverse32_16x8 = 82659,   849     Iop_Reverse32_16x8 = 82659,
850     Iop_Reverse64_8x16 = 82660,   850     Iop_Reverse64_8x16 = 82660,
851     Iop_Reverse64_16x8 = 82661,   851     Iop_Reverse64_16x8 = 82661,
852     Iop_Reverse64_32x4 = 82662,   852     Iop_Reverse64_32x4 = 82662,
853     Iop_Perm8x16 = 82663,   853     Iop_Perm8x16 = 82663,
854     Iop_Recip32x4 = 82664,   854     Iop_Recip32x4 = 82664,
855     Iop_Rsqrte32x4 = 82665   855     Iop_Rsqrte32x4 = 82665
856 } ;   856 } ;
857 typedef enum __anonenum_IROp_10 IROp;   857 typedef enum __anonenum_IROp_10 IROp;
858 enum __anonenum_IRRoundingMode_11 {   858 enum __anonenum_IRRoundingMode_11 {
859     Irrm_NEAREST = 0,   859     Irrm_NEAREST = 0,
860     Irrm_NegINF = 1,   860     Irrm_NegINF = 1,
861     Irrm_PosINF = 2,   861     Irrm_PosINF = 2,
862     Irrm_ZERO = 3   862     Irrm_ZERO = 3
863 } ;   863 } ;
864 typedef enum __anonenum_IRRoundingMode_11 IRRoundingMode;   864 typedef enum __anonenum_IRRoundingMode_11 IRRoundingMode;
865 enum __anonenum_IRCmpF64Result_12 {   865 enum __anonenum_IRCmpF64Result_12 {
866     Ircr_UN = 69,   866     Ircr_UN = 69,
867     Ircr_LT = 1,   867     Ircr_LT = 1,
868     Ircr_GT = 0,   868     Ircr_GT = 0,
869     Ircr_EQ = 64   869     Ircr_EQ = 64
870 } ;   870 } ;
871 typedef enum __anonenum_IRCmpF64Result_12 IRCmpF64Result;   871 typedef enum __anonenum_IRCmpF64Result_12 IRCmpF64Result;
872 typedef IRCmpF64Result IRCmpF32Result;   872 typedef IRCmpF64Result IRCmpF32Result;
873 typedef IRCmpF64Result IRCmpF128Result;   873 typedef IRCmpF64Result IRCmpF128Result;
874 enum __anonenum_IRExprTag_13 {   874 enum __anonenum_IRExprTag_13 {
875     Iex_Binder = 86016,   875     Iex_Binder = 86016,
876     Iex_Get = 86017,   876     Iex_Get = 86017,
877     Iex_GetI = 86018,   877     Iex_GetI = 86018,
878     Iex_RdTmp = 86019,   878     Iex_RdTmp = 86019,
879     Iex_Qop = 86020,   879     Iex_Qop = 86020,
880     Iex_Triop = 86021,   880     Iex_Triop = 86021,
881     Iex_Binop = 86022,   881     Iex_Binop = 86022,
882     Iex_Unop = 86023,   882     Iex_Unop = 86023,
883     Iex_Load = 86024,   883     Iex_Load = 86024,
884     Iex_Const = 86025,   884     Iex_Const = 86025,
885     Iex_Mux0X = 86026,   885     Iex_Mux0X = 86026,
886     Iex_CCall = 86027   886     Iex_CCall = 86027
887 } ;   887 } ;
888 typedef enum __anonenum_IRExprTag_13 IRExprTag;   888 typedef enum __anonenum_IRExprTag_13 IRExprTag;
889 struct _IRExpr;   889 struct _IRExpr;
890 typedef struct _IRExpr IRExpr;   890 typedef struct _IRExpr IRExpr;
891 struct __anonstruct_Binder_15 {   891 struct __anonstruct_Binder_15 {
892    Int binder ;   892    Int binder ;
893 };   893 };
894 struct __anonstruct_Get_16 {   894 struct __anonstruct_Get_16 {
895    Int offset ;   895    Int offset ;
896    IRType ty ;   896    IRType ty ;
897 };   897 };
898 struct __anonstruct_GetI_17 {   898 struct __anonstruct_GetI_17 {
899    IRRegArray *descr ;   899    IRRegArray *descr ;
900    IRExpr *ix ;   900    IRExpr *ix ;
901    Int bias ;   901    Int bias ;
902 };   902 };
903 struct __anonstruct_RdTmp_18 {   903 struct __anonstruct_RdTmp_18 {
904    IRTemp tmp ;   904    IRTemp tmp ;
905 };   905 };
906 struct __anonstruct_Qop_19 {   906 struct __anonstruct_Qop_19 {
907    IROp op ;   907    IROp op ;
908    IRExpr *arg1 ;   908    IRExpr *arg1 ;
909    IRExpr *arg2 ;   909    IRExpr *arg2 ;
910    IRExpr *arg3 ;   910    IRExpr *arg3 ;
911    IRExpr *arg4 ;   911    IRExpr *arg4 ;
912 };   912 };
913 struct __anonstruct_Triop_20 {   913 struct __anonstruct_Triop_20 {
914    IROp op ;   914    IROp op ;
915    IRExpr *arg1 ;   915    IRExpr *arg1 ;
916    IRExpr *arg2 ;   916    IRExpr *arg2 ;
917    IRExpr *arg3 ;   917    IRExpr *arg3 ;
918 };   918 };
919 struct __anonstruct_Binop_21 {   919 struct __anonstruct_Binop_21 {
920    IROp op ;   920    IROp op ;
921    IRExpr *arg1 ;   921    IRExpr *arg1 ;
922    IRExpr *arg2 ;   922    IRExpr *arg2 ;
923 };   923 };
924 struct __anonstruct_Unop_22 {   924 struct __anonstruct_Unop_22 {
925    IROp op ;   925    IROp op ;
926    IRExpr *arg ;   926    IRExpr *arg ;
927 };   927 };
928 struct __anonstruct_Load_23 {   928 struct __anonstruct_Load_23 {
929    IREndness end ;   929    IREndness end ;
930    IRType ty ;   930    IRType ty ;
931    IRExpr *addr ;   931    IRExpr *addr ;
932 };   932 };
933 struct __anonstruct_Const_24 {   933 struct __anonstruct_Const_24 {
934    IRConst *con ;   934    IRConst *con ;
935 };   935 };
936 struct __anonstruct_CCall_25 {   936 struct __anonstruct_CCall_25 {
937    IRCallee *cee ;   937    IRCallee *cee ;
938    IRType retty ;   938    IRType retty ;
939    IRExpr **args ;   939    IRExpr **args ;
940 };   940 };
941 struct __anonstruct_Mux0X_26 {   941 struct __anonstruct_Mux0X_26 {
942    IRExpr *cond ;   942    IRExpr *cond ;
943    IRExpr *expr0 ;   943    IRExpr *expr0 ;
944    IRExpr *exprX ;   944    IRExpr *exprX ;
945 };   945 };
946 union __anonunion_Iex_14 {   946 union __anonunion_Iex_14 {
947    struct __anonstruct_Binder_15 Binder ;   947    struct __anonstruct_Binder_15 Binder ;
948    struct __anonstruct_Get_16 Get ;   948    struct __anonstruct_Get_16 Get ;
949    struct __anonstruct_GetI_17 GetI ;   949    struct __anonstruct_GetI_17 GetI ;
950    struct __anonstruct_RdTmp_18 RdTmp ;   950    struct __anonstruct_RdTmp_18 RdTmp ;
951    struct __anonstruct_Qop_19 Qop ;   951    struct __anonstruct_Qop_19 Qop ;
952    struct __anonstruct_Triop_20 Triop ;   952    struct __anonstruct_Triop_20 Triop ;
953    struct __anonstruct_Binop_21 Binop ;   953    struct __anonstruct_Binop_21 Binop ;
954    struct __anonstruct_Unop_22 Unop ;   954    struct __anonstruct_Unop_22 Unop ;
955    struct __anonstruct_Load_23 Load ;   955    struct __anonstruct_Load_23 Load ;
956    struct __anonstruct_Const_24 Const ;   956    struct __anonstruct_Const_24 Const ;
957    struct __anonstruct_CCall_25 CCall ;   957    struct __anonstruct_CCall_25 CCall ;
958    struct __anonstruct_Mux0X_26 Mux0X ;   958    struct __anonstruct_Mux0X_26 Mux0X ;
959 };   959 };
960 struct _IRExpr {   960 struct _IRExpr {
961    IRExprTag tag ;   961    IRExprTag tag ;
962    union __anonunion_Iex_14 Iex ;   962    union __anonunion_Iex_14 Iex ;
963 };   963 };
964 enum __anonenum_IRJumpKind_27 {   964 enum __anonenum_IRJumpKind_27 {
965     Ijk_Boring = 90112,   965     Ijk_Boring = 90112,
966     Ijk_Call = 90113,   966     Ijk_Call = 90113,
967     Ijk_Ret = 90114,   967     Ijk_Ret = 90114,
968     Ijk_ClientReq = 90115,   968     Ijk_ClientReq = 90115,
969     Ijk_Yield = 90116,   969     Ijk_Yield = 90116,
970     Ijk_EmWarn = 90117,   970     Ijk_EmWarn = 90117,
971     Ijk_EmFail = 90118,   971     Ijk_EmFail = 90118,
972     Ijk_NoDecode = 90119,   972     Ijk_NoDecode = 90119,
973     Ijk_MapFail = 90120,   973     Ijk_MapFail = 90120,
974     Ijk_TInval = 90121,   974     Ijk_TInval = 90121,
975     Ijk_NoRedir = 90122,   975     Ijk_NoRedir = 90122,
976     Ijk_SigTRAP = 90123,   976     Ijk_SigTRAP = 90123,
977     Ijk_SigSEGV = 90124,   977     Ijk_SigSEGV = 90124,
978     Ijk_SigBUS = 90125,   978     Ijk_SigBUS = 90125,
979     Ijk_Sys_syscall = 90126,   979     Ijk_Sys_syscall = 90126,
980     Ijk_Sys_int32 = 90127,   980     Ijk_Sys_int32 = 90127,
981     Ijk_Sys_int128 = 90128,   981     Ijk_Sys_int128 = 90128,
982     Ijk_Sys_int129 = 90129,   982     Ijk_Sys_int129 = 90129,
983     Ijk_Sys_int130 = 90130,   983     Ijk_Sys_int130 = 90130,
984     Ijk_Sys_sysenter = 90131   984     Ijk_Sys_sysenter = 90131
985 } ;   985 } ;
986 typedef enum __anonenum_IRJumpKind_27 IRJumpKind;   986 typedef enum __anonenum_IRJumpKind_27 IRJumpKind;
987 enum __anonenum_IREffect_28 {   987 enum __anonenum_IREffect_28 {
988     Ifx_None = 94208,   988     Ifx_None = 94208,
989     Ifx_Read = 94209,   989     Ifx_Read = 94209,
990     Ifx_Write = 94210,   990     Ifx_Write = 94210,
991     Ifx_Modify = 94211   991     Ifx_Modify = 94211
992 } ;   992 } ;
993 typedef enum __anonenum_IREffect_28 IREffect;   993 typedef enum __anonenum_IREffect_28 IREffect;
994 struct __anonstruct_fxState_30 {   994 struct __anonstruct_fxState_30 {
995    IREffect fx ;   995    IREffect fx ;
996    Int offset ;   996    Int offset ;
997    Int size ;   997    Int size ;
998 };   998 };
999 struct __anonstruct_IRDirty_29 {   999 struct __anonstruct_IRDirty_29 {
1000    IRCallee *cee ;   1000    IRCallee *cee ;
1001    IRExpr *guard ;   1001    IRExpr *guard ;
1002    IRExpr **args ;   1002    IRExpr **args ;
1003    IRTemp tmp ;   1003    IRTemp tmp ;
1004    IREffect mFx ;   1004    IREffect mFx ;
1005    IRExpr *mAddr ;   1005    IRExpr *mAddr ;
1006    Int mSize ;   1006    Int mSize ;
1007    Bool needsBBP ;   1007    Bool needsBBP ;
1008    Int nFxState ;   1008    Int nFxState ;
1009    struct __anonstruct_fxState_30 fxState[7] ;   1009    struct __anonstruct_fxState_30 fxState[7] ;
1010 };   1010 };
1011 typedef struct __anonstruct_IRDirty_29 IRDirty;   1011 typedef struct __anonstruct_IRDirty_29 IRDirty;
1012 enum __anonenum_IRMBusEvent_31 {   1012 enum __anonenum_IRMBusEvent_31 {
1013     Imbe_Fence = 98304   1013     Imbe_Fence = 98304
1014 } ;   1014 } ;
1015 typedef enum __anonenum_IRMBusEvent_31 IRMBusEvent;   1015 typedef enum __anonenum_IRMBusEvent_31 IRMBusEvent;
1016 struct __anonstruct_IRCAS_32 {   1016 struct __anonstruct_IRCAS_32 {
1017    IRTemp oldHi ;   1017    IRTemp oldHi ;
1018    IRTemp oldLo ;   1018    IRTemp oldLo ;
1019    IREndness end ;   1019    IREndness end ;
1020    IRExpr *addr ;   1020    IRExpr *addr ;
1021    IRExpr *expdHi ;   1021    IRExpr *expdHi ;
1022    IRExpr *expdLo ;   1022    IRExpr *expdLo ;
1023    IRExpr *dataHi ;   1023    IRExpr *dataHi ;
1024    IRExpr *dataLo ;   1024    IRExpr *dataLo ;
1025 };   1025 };
1026 typedef struct __anonstruct_IRCAS_32 IRCAS;   1026 typedef struct __anonstruct_IRCAS_32 IRCAS;
1027 enum __anonenum_IRStmtTag_33 {   1027 enum __anonenum_IRStmtTag_33 {
1028     Ist_NoOp = 102400,   1028     Ist_NoOp = 102400,
1029     Ist_IMark = 102401,   1029     Ist_IMark = 102401,
1030     Ist_AbiHint = 102402,   1030     Ist_AbiHint = 102402,
1031     Ist_Put = 102403,   1031     Ist_Put = 102403,
1032     Ist_PutI = 102404,   1032     Ist_PutI = 102404,
1033     Ist_WrTmp = 102405,   1033     Ist_WrTmp = 102405,
1034     Ist_Store = 102406,   1034     Ist_Store = 102406,
1035     Ist_CAS = 102407,   1035     Ist_CAS = 102407,
1036     Ist_LLSC = 102408,   1036     Ist_LLSC = 102408,
1037     Ist_Dirty = 102409,   1037     Ist_Dirty = 102409,
1038     Ist_MBE = 102410,   1038     Ist_MBE = 102410,
1039     Ist_Exit = 102411   1039     Ist_Exit = 102411
1040 } ;   1040 } ;
1041 typedef enum __anonenum_IRStmtTag_33 IRStmtTag;   1041 typedef enum __anonenum_IRStmtTag_33 IRStmtTag;
1042 struct __anonstruct_NoOp_35 {   1042 struct __anonstruct_NoOp_35 {
1043     1043  
1044 };   1044 };
1045 struct __anonstruct_IMark_36 {   1045 struct __anonstruct_IMark_36 {
1046    Addr64 addr ;   1046    Addr64 addr ;
1047    Int len ;   1047    Int len ;
1048 };   1048 };
1049 struct __anonstruct_AbiHint_37 {   1049 struct __anonstruct_AbiHint_37 {
1050    IRExpr *base ;   1050    IRExpr *base ;
1051    Int len ;   1051    Int len ;
1052    IRExpr *nia ;   1052    IRExpr *nia ;
1053 };   1053 };
1054 struct __anonstruct_Put_38 {   1054 struct __anonstruct_Put_38 {
1055    Int offset ;   1055    Int offset ;
1056    IRExpr *data ;   1056    IRExpr *data ;
1057 };   1057 };
1058 struct __anonstruct_PutI_39 {   1058 struct __anonstruct_PutI_39 {
1059    IRRegArray *descr ;   1059    IRRegArray *descr ;
1060    IRExpr *ix ;   1060    IRExpr *ix ;
1061    Int bias ;   1061    Int bias ;
1062    IRExpr *data ;   1062    IRExpr *data ;
1063 };   1063 };
1064 struct __anonstruct_WrTmp_40 {   1064 struct __anonstruct_WrTmp_40 {
1065    IRTemp tmp ;   1065    IRTemp tmp ;
1066    IRExpr *data ;   1066    IRExpr *data ;
1067 };   1067 };
1068 struct __anonstruct_Store_41 {   1068 struct __anonstruct_Store_41 {
1069    IREndness end ;   1069    IREndness end ;
1070    IRExpr *addr ;   1070    IRExpr *addr ;
1071    IRExpr *data ;   1071    IRExpr *data ;
1072 };   1072 };
1073 struct __anonstruct_CAS_42 {   1073 struct __anonstruct_CAS_42 {
1074    IRCAS *details ;   1074    IRCAS *details ;
1075 };   1075 };
1076 struct __anonstruct_LLSC_43 {   1076 struct __anonstruct_LLSC_43 {
1077    IREndness end ;   1077    IREndness end ;
1078    IRTemp result ;   1078    IRTemp result ;
1079    IRExpr *addr ;   1079    IRExpr *addr ;
1080    IRExpr *storedata ;   1080    IRExpr *storedata ;
1081 };   1081 };
1082 struct __anonstruct_Dirty_44 {   1082 struct __anonstruct_Dirty_44 {
1083    IRDirty *details ;   1083    IRDirty *details ;
1084 };   1084 };
1085 struct __anonstruct_MBE_45 {   1085 struct __anonstruct_MBE_45 {
1086    IRMBusEvent event ;   1086    IRMBusEvent event ;
1087 };   1087 };
1088 struct __anonstruct_Exit_46 {   1088 struct __anonstruct_Exit_46 {
1089    IRExpr *guard ;   1089    IRExpr *guard ;
1090    IRJumpKind jk ;   1090    IRJumpKind jk ;
1091    IRConst *dst ;   1091    IRConst *dst ;
1092 };   1092 };
1093 union __anonunion_Ist_34 {   1093 union __anonunion_Ist_34 {
1094    struct __anonstruct_NoOp_35 NoOp ;   1094    struct __anonstruct_NoOp_35 NoOp ;
1095    struct __anonstruct_IMark_36 IMark ;   1095    struct __anonstruct_IMark_36 IMark ;
1096    struct __anonstruct_AbiHint_37 AbiHint ;   1096    struct __anonstruct_AbiHint_37 AbiHint ;
1097    struct __anonstruct_Put_38 Put ;   1097    struct __anonstruct_Put_38 Put ;
1098    struct __anonstruct_PutI_39 PutI ;   1098    struct __anonstruct_PutI_39 PutI ;
1099    struct __anonstruct_WrTmp_40 WrTmp ;   1099    struct __anonstruct_WrTmp_40 WrTmp ;
1100    struct __anonstruct_Store_41 Store ;   1100    struct __anonstruct_Store_41 Store ;
1101    struct __anonstruct_CAS_42 CAS ;   1101    struct __anonstruct_CAS_42 CAS ;
1102    struct __anonstruct_LLSC_43 LLSC ;   1102    struct __anonstruct_LLSC_43 LLSC ;
1103    struct __anonstruct_Dirty_44 Dirty ;   1103    struct __anonstruct_Dirty_44 Dirty ;
1104    struct __anonstruct_MBE_45 MBE ;   1104    struct __anonstruct_MBE_45 MBE ;
1105    struct __anonstruct_Exit_46 Exit ;   1105    struct __anonstruct_Exit_46 Exit ;
1106 };   1106 };
1107 struct _IRStmt {   1107 struct _IRStmt {
1108    IRStmtTag tag ;   1108    IRStmtTag tag ;
1109    union __anonunion_Ist_34 Ist ;   1109    union __anonunion_Ist_34 Ist ;
1110 };   1110 };
1111 typedef struct _IRStmt IRStmt;   1111 typedef struct _IRStmt IRStmt;
1112 struct __anonstruct_IRTypeEnv_47 {   1112 struct __anonstruct_IRTypeEnv_47 {
1113    IRType *types ;   1113    IRType *types ;
1114    Int types_size ;   1114    Int types_size ;
1115    Int types_used ;   1115    Int types_used ;
1116 };   1116 };
1117 typedef struct __anonstruct_IRTypeEnv_47 IRTypeEnv;   1117 typedef struct __anonstruct_IRTypeEnv_47 IRTypeEnv;
1118 struct __anonstruct_IRSB_48 {   1118 struct __anonstruct_IRSB_48 {
1119    IRTypeEnv *tyenv ;   1119    IRTypeEnv *tyenv ;
1120    IRStmt **stmts ;   1120    IRStmt **stmts ;
1121    Int stmts_size ;   1121    Int stmts_size ;
1122    Int stmts_used ;   1122    Int stmts_used ;
1123    IRExpr *next ;   1123    IRExpr *next ;
1124    IRJumpKind jumpkind ;   1124    IRJumpKind jumpkind ;
1125 };   1125 };
1126 typedef struct __anonstruct_IRSB_48 IRSB;   1126 typedef struct __anonstruct_IRSB_48 IRSB;
1127 enum __anonenum_VexArch_49 {   1127 enum __anonenum_VexArch_49 {
1128     VexArch_INVALID = 0,   1128     VexArch_INVALID = 0,
1129     VexArchX86 = 1,   1129     VexArchX86 = 1,
1130     VexArchAMD64 = 2,   1130     VexArchAMD64 = 2,
1131     VexArchARM = 3,   1131     VexArchARM = 3,
1132     VexArchPPC32 = 4,   1132     VexArchPPC32 = 4,
1133     VexArchPPC64 = 5,   1133     VexArchPPC64 = 5,
1134     VexArchS390X = 6   1134     VexArchS390X = 6
1135 } ;   1135 } ;
1136 typedef enum __anonenum_VexArch_49 VexArch;   1136 typedef enum __anonenum_VexArch_49 VexArch;
1137 struct __anonstruct_VexArchInfo_50 {   1137 struct __anonstruct_VexArchInfo_50 {
1138    UInt hwcaps ;   1138    UInt hwcaps ;
1139    Int ppc_cache_line_szB ;   1139    Int ppc_cache_line_szB ;
1140    UInt ppc_dcbz_szB ;   1140    UInt ppc_dcbz_szB ;
1141    UInt ppc_dcbzl_szB ;   1141    UInt ppc_dcbzl_szB ;
1142 };   1142 };
1143 typedef struct __anonstruct_VexArchInfo_50 VexArchInfo;   1143 typedef struct __anonstruct_VexArchInfo_50 VexArchInfo;
1144 struct __anonstruct_VexAbiInfo_51 {   1144 struct __anonstruct_VexAbiInfo_51 {
1145    Int guest_stack_redzone_size ;   1145    Int guest_stack_redzone_size ;
1146    Bool guest_amd64_assume_fs_is_zero ;   1146    Bool guest_amd64_assume_fs_is_zero ;
1147    Bool guest_amd64_assume_gs_is_0x60 ;   1147    Bool guest_amd64_assume_gs_is_0x60 ;
1148    Bool guest_ppc_zap_RZ_at_blr ;   1148    Bool guest_ppc_zap_RZ_at_blr ;
1149    Bool (*guest_ppc_zap_RZ_at_bl)(Addr64  ) ;   1149    Bool (*guest_ppc_zap_RZ_at_bl)(Addr64  ) ;
1150    Bool guest_ppc_sc_continues_at_LR ;   1150    Bool guest_ppc_sc_continues_at_LR ;
1151    Bool host_ppc_calls_use_fndescrs ;   1151    Bool host_ppc_calls_use_fndescrs ;
1152    Bool host_ppc32_regalign_int64_args ;   1152    Bool host_ppc32_regalign_int64_args ;
1153 };   1153 };
1154 typedef struct __anonstruct_VexAbiInfo_51 VexAbiInfo;   1154 typedef struct __anonstruct_VexAbiInfo_51 VexAbiInfo;
1155 struct __anonstruct_VexControl_52 {   1155 struct __anonstruct_VexControl_52 {
1156    Int iropt_verbosity ;   1156    Int iropt_verbosity ;
1157    Int iropt_level ;   1157    Int iropt_level ;
1158    Bool iropt_precise_memory_exns ;   1158    Bool iropt_precise_memory_exns ;
1159    Int iropt_unroll_thresh ;   1159    Int iropt_unroll_thresh ;
1160    Int guest_max_insns ;   1160    Int guest_max_insns ;
1161    Int guest_chase_thresh ;   1161    Int guest_chase_thresh ;
1162    Bool guest_chase_cond ;   1162    Bool guest_chase_cond ;
1163 };   1163 };
1164 typedef struct __anonstruct_VexControl_52 VexControl;   1164 typedef struct __anonstruct_VexControl_52 VexControl;
1165 struct __anonstruct_alwaysDefd_54 {   1165 struct __anonstruct_alwaysDefd_54 {
1166    Int offset ;   1166    Int offset ;
1167    Int size ;   1167    Int size ;
1168 };   1168 };
1169 struct __anonstruct_VexGuestLayout_53 {   1169 struct __anonstruct_VexGuestLayout_53 {
1170    Int total_sizeB ;   1170    Int total_sizeB ;
1171    Int offset_SP ;   1171    Int offset_SP ;
1172    Int sizeof_SP ;   1172    Int sizeof_SP ;
1173    Int offset_FP ;   1173    Int offset_FP ;
1174    Int sizeof_FP ;   1174    Int sizeof_FP ;
1175    Int offset_IP ;   1175    Int offset_IP ;
1176    Int sizeof_IP ;   1176    Int sizeof_IP ;
1177    Int n_alwaysDefd ;   1177    Int n_alwaysDefd ;
1178    struct __anonstruct_alwaysDefd_54 alwaysDefd[24] ;   1178    struct __anonstruct_alwaysDefd_54 alwaysDefd[24] ;
1179 };   1179 };
1180 typedef struct __anonstruct_VexGuestLayout_53 VexGuestLayout;   1180 typedef struct __anonstruct_VexGuestLayout_53 VexGuestLayout;
1181 enum __anonenum_VexTranslateResult_55 {   1181 enum __anonenum_VexTranslateResult_55 {
1182     VexTransOK = 0,   1182     VexTransOK = 0,
1183     VexTransAccessFail = 1,   1183     VexTransAccessFail = 1,
1184     VexTransOutputFull = 2   1184     VexTransOutputFull = 2
1185 } ;   1185 } ;
1186 typedef enum __anonenum_VexTranslateResult_55 VexTranslateResult;   1186 typedef enum __anonenum_VexTranslateResult_55 VexTranslateResult;
1187 struct __anonstruct_VexGuestExtents_56 {   1187 struct __anonstruct_VexGuestExtents_56 {
1188    Addr64 base[3] ;   1188    Addr64 base[3] ;
1189    UShort len[3] ;   1189    UShort len[3] ;
1190    UShort n_used ;   1190    UShort n_used ;
1191 };   1191 };
1192 typedef struct __anonstruct_VexGuestExtents_56 VexGuestExtents;   1192 typedef struct __anonstruct_VexGuestExtents_56 VexGuestExtents;
1193 struct __anonstruct_VexTranslateArgs_57 {   1193 struct __anonstruct_VexTranslateArgs_57 {
1194    VexArch arch_guest ;   1194    VexArch arch_guest ;
1195    VexArchInfo archinfo_guest ;   1195    VexArchInfo archinfo_guest ;
1196    VexArch arch_host ;   1196    VexArch arch_host ;
1197    VexArchInfo archinfo_host ;   1197    VexArchInfo archinfo_host ;
1198    VexAbiInfo abiinfo_both ;   1198    VexAbiInfo abiinfo_both ;
1199    void *callback_opaque ;   1199    void *callback_opaque ;
1200    UChar *guest_bytes ;   1200    UChar *guest_bytes ;
1201    Addr64 guest_bytes_addr ;   1201    Addr64 guest_bytes_addr ;
1202    Bool (*chase_into_ok)(void * , Addr64  ) ;   1202    Bool (*chase_into_ok)(void * , Addr64  ) ;
1203    VexGuestExtents *guest_extents ;   1203    VexGuestExtents *guest_extents ;
1204    UChar *host_bytes ;   1204    UChar *host_bytes ;
1205    Int host_bytes_size ;   1205    Int host_bytes_size ;
1206    Int *host_bytes_used ;   1206    Int *host_bytes_used ;
1207    IRSB *(*instrument1)(void * , IRSB * , VexGuestLayout * , VexGuestExtents * ,   1207    IRSB *(*instrument1)(void * , IRSB * , VexGuestLayout * , VexGuestExtents * ,
1208                         IRType gWordTy , IRType hWordTy ) ;   1208                         IRType gWordTy , IRType hWordTy ) ;
1209    IRSB *(*instrument2)(void * , IRSB * , VexGuestLayout * , VexGuestExtents * ,   1209    IRSB *(*instrument2)(void * , IRSB * , VexGuestLayout * , VexGuestExtents * ,
1210                         IRType gWordTy , IRType hWordTy ) ;   1210                         IRType gWordTy , IRType hWordTy ) ;
1211    IRSB *(*finaltidy)(IRSB * ) ;   1211    IRSB *(*finaltidy)(IRSB * ) ;
1212    Bool do_self_check ;   1212    Bool do_self_check ;
1213    Bool (*preamble_function)(void * , IRSB * ) ;   1213    Bool (*preamble_function)(void * , IRSB * ) ;
1214    Int traceflags ;   1214    Int traceflags ;
1215    void *dispatch ;   1215    void *dispatch ;
1216 };   1216 };
1217 typedef struct __anonstruct_VexTranslateArgs_57 VexTranslateArgs;   1217 typedef struct __anonstruct_VexTranslateArgs_57 VexTranslateArgs;
1218 enum __anonenum_VexEmWarn_58 {   1218 enum __anonenum_VexEmWarn_58 {
1219     EmWarn_NONE = 0,   1219     EmWarn_NONE = 0,
1220     EmWarn_X86_x87exns = 1,   1220     EmWarn_X86_x87exns = 1,
1221     EmWarn_X86_x87precision = 2,   1221     EmWarn_X86_x87precision = 2,
1222     EmWarn_X86_sseExns = 3,   1222     EmWarn_X86_sseExns = 3,
1223     EmWarn_X86_fz = 4,   1223     EmWarn_X86_fz = 4,
1224     EmWarn_X86_daz = 5,   1224     EmWarn_X86_daz = 5,
1225     EmWarn_X86_acFlag = 6,   1225     EmWarn_X86_acFlag = 6,
1226     EmWarn_PPCexns = 7,   1226     EmWarn_PPCexns = 7,
1227     EmWarn_PPC64_redir_overflow = 8,   1227     EmWarn_PPC64_redir_overflow = 8,
1228     EmWarn_PPC64_redir_underflow = 9,   1228     EmWarn_PPC64_redir_underflow = 9,
1229     EmWarn_NUMBER = 10   1229     EmWarn_NUMBER = 10
1230 } ;   1230 } ;
1231 typedef enum __anonenum_VexEmWarn_58 VexEmWarn;   1231 typedef enum __anonenum_VexEmWarn_58 VexEmWarn;
1232 struct __anonstruct_VexGuestX86State_59 {   1232 struct __anonstruct_VexGuestX86State_59 {
1233    UInt guest_EAX ;   1233    UInt guest_EAX ;
1234    UInt guest_ECX ;   1234    UInt guest_ECX ;
1235    UInt guest_EDX ;   1235    UInt guest_EDX ;
1236    UInt guest_EBX ;   1236    UInt guest_EBX ;
1237    UInt guest_ESP ;   1237    UInt guest_ESP ;
1238    UInt guest_EBP ;   1238    UInt guest_EBP ;
1239    UInt guest_ESI ;   1239    UInt guest_ESI ;
1240    UInt guest_EDI ;   1240    UInt guest_EDI ;
1241    UInt guest_CC_OP ;   1241    UInt guest_CC_OP ;
1242    UInt guest_CC_DEP1 ;   1242    UInt guest_CC_DEP1 ;
1243    UInt guest_CC_DEP2 ;   1243    UInt guest_CC_DEP2 ;
1244    UInt guest_CC_NDEP ;   1244    UInt guest_CC_NDEP ;
1245    UInt guest_DFLAG ;   1245    UInt guest_DFLAG ;
1246    UInt guest_IDFLAG ;   1246    UInt guest_IDFLAG ;
1247    UInt guest_ACFLAG ;   1247    UInt guest_ACFLAG ;
1248    UInt guest_EIP ;   1248    UInt guest_EIP ;
1249    ULong guest_FPREG[8] ;   1249    ULong guest_FPREG[8] ;
1250    UChar guest_FPTAG[8] ;   1250    UChar guest_FPTAG[8] ;
1251    UInt guest_FPROUND ;   1251    UInt guest_FPROUND ;
1252    UInt guest_FC3210 ;   1252    UInt guest_FC3210 ;
1253    UInt guest_FTOP ;   1253    UInt guest_FTOP ;
1254    UInt guest_SSEROUND ;   1254    UInt guest_SSEROUND ;
1255    U128 guest_XMM0 ;   1255    U128 guest_XMM0 ;
1256    U128 guest_XMM1 ;   1256    U128 guest_XMM1 ;
1257    U128 guest_XMM2 ;   1257    U128 guest_XMM2 ;
1258    U128 guest_XMM3 ;   1258    U128 guest_XMM3 ;
1259    U128 guest_XMM4 ;   1259    U128 guest_XMM4 ;
1260    U128 guest_XMM5 ;   1260    U128 guest_XMM5 ;
1261    U128 guest_XMM6 ;   1261    U128 guest_XMM6 ;
1262    U128 guest_XMM7 ;   1262    U128 guest_XMM7 ;
1263    UShort guest_CS ;   1263    UShort guest_CS ;
1264    UShort guest_DS ;   1264    UShort guest_DS ;
1265    UShort guest_ES ;   1265    UShort guest_ES ;
1266    UShort guest_FS ;   1266    UShort guest_FS ;
1267    UShort guest_GS ;   1267    UShort guest_GS ;
1268    UShort guest_SS ;   1268    UShort guest_SS ;
1269    HWord guest_LDT ;   1269    HWord guest_LDT ;
1270    HWord guest_GDT ;   1270    HWord guest_GDT ;
1271    UInt guest_EMWARN ;   1271    UInt guest_EMWARN ;
1272    UInt guest_TISTART ;   1272    UInt guest_TISTART ;
1273    UInt guest_TILEN ;   1273    UInt guest_TILEN ;
1274    UInt guest_NRADDR ;   1274    UInt guest_NRADDR ;
1275    UInt guest_SC_CLASS ;   1275    UInt guest_SC_CLASS ;
1276    UInt guest_IP_AT_SYSCALL ;   1276    UInt guest_IP_AT_SYSCALL ;
1277    UInt padding1 ;   1277    UInt padding1 ;
1278    UInt padding2 ;   1278    UInt padding2 ;
1279    UInt padding3 ;   1279    UInt padding3 ;
1280 };   1280 };
1281 typedef struct __anonstruct_VexGuestX86State_59 VexGuestX86State;   1281 typedef struct __anonstruct_VexGuestX86State_59 VexGuestX86State;
1282 struct __anonstruct_Bits_62 {   1282 struct __anonstruct_Bits_62 {
1283    UShort LimitLow ;   1283    UShort LimitLow ;
1284    UShort BaseLow ;   1284    UShort BaseLow ;
1285    UInt BaseMid : 8 ;   1285    UInt BaseMid : 8 ;
1286    UInt Type : 5 ;   1286    UInt Type : 5 ;
1287    UInt Dpl : 2 ;   1287    UInt Dpl : 2 ;
1288    UInt Pres : 1 ;   1288    UInt Pres : 1 ;
1289    UInt LimitHi : 4 ;   1289    UInt LimitHi : 4 ;
1290    UInt Sys : 1 ;   1290    UInt Sys : 1 ;
1291    UInt Reserved_0 : 1 ;   1291    UInt Reserved_0 : 1 ;
1292    UInt Default_Big : 1 ;   1292    UInt Default_Big : 1 ;
1293    UInt Granularity : 1 ;   1293    UInt Granularity : 1 ;
1294    UInt BaseHi : 8 ;   1294    UInt BaseHi : 8 ;
1295 };   1295 };
1296 struct __anonstruct_Words_63 {   1296 struct __anonstruct_Words_63 {
1297    UInt word1 ;   1297    UInt word1 ;
1298    UInt word2 ;   1298    UInt word2 ;
1299 };   1299 };
1300 union __anonunion_LdtEnt_61 {   1300 union __anonunion_LdtEnt_61 {
1301    struct __anonstruct_Bits_62 Bits ;   1301    struct __anonstruct_Bits_62 Bits ;
1302    struct __anonstruct_Words_63 Words ;   1302    struct __anonstruct_Words_63 Words ;
1303 };   1303 };
1304 struct __anonstruct_VexGuestX86SegDescr_60 {   1304 struct __anonstruct_VexGuestX86SegDescr_60 {
1305    union __anonunion_LdtEnt_61 LdtEnt ;   1305    union __anonunion_LdtEnt_61 LdtEnt ;
1306 };   1306 };
1307 typedef struct __anonstruct_VexGuestX86SegDescr_60 VexGuestX86SegDescr;   1307 typedef struct __anonstruct_VexGuestX86SegDescr_60 VexGuestX86SegDescr;
1308 struct __anonstruct_X86_66 {   1308 struct __anonstruct_X86_66 {
1309    UInt r_ebp ;   1309    UInt r_ebp ;
1310 };   1310 };
1311 struct __anonstruct_AMD64_67 {   1311 struct __anonstruct_AMD64_67 {
1312    ULong r_rbp ;   1312    ULong r_rbp ;
1313 };   1313 };
1314 struct __anonstruct_PPC32_68 {   1314 struct __anonstruct_PPC32_68 {
1315    UInt r_lr ;   1315    UInt r_lr ;
1316 };   1316 };
1317 struct __anonstruct_PPC64_69 {   1317 struct __anonstruct_PPC64_69 {
1318    ULong r_lr ;   1318    ULong r_lr ;
1319 };   1319 };
1320 struct __anonstruct_ARM_70 {   1320 struct __anonstruct_ARM_70 {
1321    UInt r14 ;   1321    UInt r14 ;
1322    UInt r12 ;   1322    UInt r12 ;
1323    UInt r11 ;   1323    UInt r11 ;
1324    UInt r7 ;   1324    UInt r7 ;
1325 };   1325 };
1326 struct __anonstruct_S390X_71 {   1326 struct __anonstruct_S390X_71 {
1327    ULong r_fp ;   1327    ULong r_fp ;
1328    ULong r_lr ;   1328    ULong r_lr ;
1329 };   1329 };
1330 union __anonunion_misc_65 {   1330 union __anonunion_misc_65 {
1331    struct __anonstruct_X86_66 X86 ;   1331    struct __anonstruct_X86_66 X86 ;
1332    struct __anonstruct_AMD64_67 AMD64 ;   1332    struct __anonstruct_AMD64_67 AMD64 ;
1333    struct __anonstruct_PPC32_68 PPC32 ;   1333    struct __anonstruct_PPC32_68 PPC32 ;
1334    struct __anonstruct_PPC64_69 PPC64 ;   1334    struct __anonstruct_PPC64_69 PPC64 ;
1335    struct __anonstruct_ARM_70 ARM ;   1335    struct __anonstruct_ARM_70 ARM ;
1336    struct __anonstruct_S390X_71 S390X ;   1336    struct __anonstruct_S390X_71 S390X ;
1337 };   1337 };
1338 struct __anonstruct_UnwindStartRegs_64 {   1338 struct __anonstruct_UnwindStartRegs_64 {
1339    ULong r_pc ;   1339    ULong r_pc ;
1340    ULong r_sp ;   1340    ULong r_sp ;
1341    union __anonunion_misc_65 misc ;   1341    union __anonunion_misc_65 misc ;
1342 };   1342 };
1343 typedef struct __anonstruct_UnwindStartRegs_64 UnwindStartRegs;   1343 typedef struct __anonstruct_UnwindStartRegs_64 UnwindStartRegs;
1344 typedef unsigned short __vki_kernel_mode_t;   1344 typedef unsigned short __vki_kernel_mode_t;
1345 typedef long __vki_kernel_off_t;   1345 typedef long __vki_kernel_off_t;
1346 typedef int __vki_kernel_pid_t;   1346 typedef int __vki_kernel_pid_t;
1347 typedef unsigned short __vki_kernel_ipc_pid_t;   1347 typedef unsigned short __vki_kernel_ipc_pid_t;
1348 typedef unsigned short __vki_kernel_uid_t;   1348 typedef unsigned short __vki_kernel_uid_t;
1349 typedef unsigned short __vki_kernel_gid_t;   1349 typedef unsigned short __vki_kernel_gid_t;
1350 typedef unsigned int __vki_kernel_size_t;   1350 typedef unsigned int __vki_kernel_size_t;
1351 typedef long __vki_kernel_time_t;   1351 typedef long __vki_kernel_time_t;
1352 typedef long __vki_kernel_suseconds_t;   1352 typedef long __vki_kernel_suseconds_t;
1353 typedef long __vki_kernel_clock_t;   1353 typedef long __vki_kernel_clock_t;
1354 typedef int __vki_kernel_timer_t;   1354 typedef int __vki_kernel_timer_t;
1355 typedef int __vki_kernel_clockid_t;   1355 typedef int __vki_kernel_clockid_t;
1356 typedef char *__vki_kernel_caddr_t;   1356 typedef char *__vki_kernel_caddr_t;
1357 typedef unsigned int __vki_kernel_uid32_t;   1357 typedef unsigned int __vki_kernel_uid32_t;
1358 typedef unsigned int __vki_kernel_gid32_t;   1358 typedef unsigned int __vki_kernel_gid32_t;
1359 typedef unsigned short __vki_kernel_old_uid_t;   1359 typedef unsigned short __vki_kernel_old_uid_t;
1360 typedef unsigned short __vki_kernel_old_gid_t;   1360 typedef unsigned short __vki_kernel_old_gid_t;
1361 typedef long long __vki_kernel_loff_t;   1361 typedef long long __vki_kernel_loff_t;
1362 struct __anonstruct___vki_kernel_fsid_t_72 {   1362 struct __anonstruct___vki_kernel_fsid_t_72 {
1363    int val[2] ;   1363    int val[2] ;
1364 };   1364 };
1365 typedef struct __anonstruct___vki_kernel_fsid_t_72 __vki_kernel_fsid_t;   1365 typedef struct __anonstruct___vki_kernel_fsid_t_72 __vki_kernel_fsid_t;
1366 struct __anonstruct___vki_kernel_fd_set_73 {   1366 struct __anonstruct___vki_kernel_fd_set_73 {
1367    unsigned long fds_bits[1024U / (8U * sizeof(unsigned long ))] ;   1367    unsigned long fds_bits[1024U / (8U * sizeof(unsigned long ))] ;
1368 };   1368 };
1369 typedef struct __anonstruct___vki_kernel_fd_set_73 __vki_kernel_fd_set;   1369 typedef struct __anonstruct___vki_kernel_fd_set_73 __vki_kernel_fd_set;
1370 typedef int __vki_kernel_key_t;   1370 typedef int __vki_kernel_key_t;
1371 typedef int __vki_kernel_mqd_t;   1371 typedef int __vki_kernel_mqd_t;
1372 typedef __vki_kernel_fd_set vki_fd_set;   1372 typedef __vki_kernel_fd_set vki_fd_set;
1373 typedef __vki_kernel_mode_t vki_mode_t;   1373 typedef __vki_kernel_mode_t vki_mode_t;
1374 typedef __vki_kernel_off_t vki_off_t;   1374 typedef __vki_kernel_off_t vki_off_t;
1375 typedef __vki_kernel_pid_t vki_pid_t;   1375 typedef __vki_kernel_pid_t vki_pid_t;
1376 typedef __vki_kernel_key_t vki_key_t;   1376 typedef __vki_kernel_key_t vki_key_t;
1377 typedef __vki_kernel_suseconds_t vki_suseconds_t;   1377 typedef __vki_kernel_suseconds_t vki_suseconds_t;
1378 typedef __vki_kernel_timer_t vki_timer_t;   1378 typedef __vki_kernel_timer_t vki_timer_t;
1379 typedef __vki_kernel_clockid_t vki_clockid_t;   1379 typedef __vki_kernel_clockid_t vki_clockid_t;
1380 typedef __vki_kernel_mqd_t vki_mqd_t;   1380 typedef __vki_kernel_mqd_t vki_mqd_t;
1381 typedef __vki_kernel_uid32_t vki_uid_t;   1381 typedef __vki_kernel_uid32_t vki_uid_t;
1382 typedef __vki_kernel_gid32_t vki_gid_t;   1382 typedef __vki_kernel_gid32_t vki_gid_t;
1383 typedef __vki_kernel_old_uid_t vki_old_uid_t;   1383 typedef __vki_kernel_old_uid_t vki_old_uid_t;
1384 typedef __vki_kernel_old_gid_t vki_old_gid_t;   1384 typedef __vki_kernel_old_gid_t vki_old_gid_t;
1385 typedef __vki_kernel_loff_t vki_loff_t;   1385 typedef __vki_kernel_loff_t vki_loff_t;
1386 typedef __vki_kernel_size_t vki_size_t;   1386 typedef __vki_kernel_size_t vki_size_t;
1387 typedef __vki_kernel_time_t vki_time_t;   1387 typedef __vki_kernel_time_t vki_time_t;
1388 typedef __vki_kernel_clock_t vki_clock_t;   1388 typedef __vki_kernel_clock_t vki_clock_t;
1389 typedef __vki_kernel_caddr_t vki_caddr_t;   1389 typedef __vki_kernel_caddr_t vki_caddr_t;
1390 typedef unsigned long vki_u_long;   1390 typedef unsigned long vki_u_long;
1391 typedef unsigned int vki_uint;   1391 typedef unsigned int vki_uint;
1392 typedef unsigned char __vki_u8;   1392 typedef unsigned char __vki_u8;
1393 typedef short __vki_s16;   1393 typedef short __vki_s16;
1394 typedef unsigned short __vki_u16;   1394 typedef unsigned short __vki_u16;
1395 typedef int __vki_s32;   1395 typedef int __vki_s32;
1396 typedef unsigned int __vki_u32;   1396 typedef unsigned int __vki_u32;
1397 typedef long long __vki_s64;   1397 typedef long long __vki_s64;
1398 typedef unsigned long long __vki_u64;   1398 typedef unsigned long long __vki_u64;
1399 typedef unsigned short vki_u16;   1399 typedef unsigned short vki_u16;
1400 typedef unsigned int vki_u32;   1400 typedef unsigned int vki_u32;
1401 typedef void __vki_signalfn_t(int  );   1401 typedef void __vki_signalfn_t(int  );
1402 typedef __vki_signalfn_t *__vki_sighandler_t;   1402 typedef __vki_signalfn_t *__vki_sighandler_t;
1403 typedef void __vki_restorefn_t(void);   1403 typedef void __vki_restorefn_t(void);
1404 typedef __vki_restorefn_t *__vki_sigrestore_t;   1404 typedef __vki_restorefn_t *__vki_sigrestore_t;
1405 typedef unsigned long vki_old_sigset_t;   1405 typedef unsigned long vki_old_sigset_t;
1406 struct __anonstruct_vki_sigset_t_74 {   1406 struct __anonstruct_vki_sigset_t_74 {
1407    unsigned long sig[2] ;   1407    unsigned long sig[2] ;
1408 };   1408 };
1409 typedef struct __anonstruct_vki_sigset_t_74 vki_sigset_t;   1409 typedef struct __anonstruct_vki_sigset_t_74 vki_sigset_t;
1410 struct vki_old_sigaction {   1410 struct vki_old_sigaction {
1411    __vki_sighandler_t ksa_handler ;   1411    __vki_sighandler_t ksa_handler ;
1412    vki_old_sigset_t sa_mask ;   1412    vki_old_sigset_t sa_mask ;
1413    unsigned long sa_flags ;   1413    unsigned long sa_flags ;
1414    __vki_sigrestore_t sa_restorer ;   1414    __vki_sigrestore_t sa_restorer ;
1415 };   1415 };
1416 struct vki_sigaction_base {   1416 struct vki_sigaction_base {
1417    __vki_sighandler_t ksa_handler ;   1417    __vki_sighandler_t ksa_handler ;
1418    unsigned long sa_flags ;   1418    unsigned long sa_flags ;
1419    __vki_sigrestore_t sa_restorer ;   1419    __vki_sigrestore_t sa_restorer ;
1420    vki_sigset_t sa_mask ;   1420    vki_sigset_t sa_mask ;
1421 };   1421 };
1422 typedef struct vki_sigaction_base vki_sigaction_toK_t;   1422 typedef struct vki_sigaction_base vki_sigaction_toK_t;
1423 typedef struct vki_sigaction_base vki_sigaction_fromK_t;   1423 typedef struct vki_sigaction_base vki_sigaction_fromK_t;
1424 struct vki_sigaltstack {   1424 struct vki_sigaltstack {
1425    void *ss_sp ;   1425    void *ss_sp ;
1426    int ss_flags ;   1426    int ss_flags ;
1427    vki_size_t ss_size ;   1427    vki_size_t ss_size ;
1428 };   1428 };
1429 typedef struct vki_sigaltstack vki_stack_t;   1429 typedef struct vki_sigaltstack vki_stack_t;
1430 struct _vki_fpreg {   1430 struct _vki_fpreg {
1431    unsigned short significand[4] ;   1431    unsigned short significand[4] ;
1432    unsigned short exponent ;   1432    unsigned short exponent ;
1433 };   1433 };
1434 struct _vki_fpxreg {   1434 struct _vki_fpxreg {
1435    unsigned short significand[4] ;   1435    unsigned short significand[4] ;
1436    unsigned short exponent ;   1436    unsigned short exponent ;
1437    unsigned short padding[3] ;   1437    unsigned short padding[3] ;
1438 };   1438 };
1439 struct _vki_xmmreg {   1439 struct _vki_xmmreg {
1440    unsigned long element[4] ;   1440    unsigned long element[4] ;
1441 };   1441 };
1442 struct _vki_fpstate {   1442 struct _vki_fpstate {
1443    unsigned long cw ;   1443    unsigned long cw ;
1444    unsigned long sw ;   1444    unsigned long sw ;
1445    unsigned long tag ;   1445    unsigned long tag ;
1446    unsigned long ipoff ;   1446    unsigned long ipoff ;
1447    unsigned long cssel ;   1447    unsigned long cssel ;
1448    unsigned long dataoff ;   1448    unsigned long dataoff ;
1449    unsigned long datasel ;   1449    unsigned long datasel ;
1450    struct _vki_fpreg _st[8] ;   1450    struct _vki_fpreg _st[8] ;
1451    unsigned short status ;   1451    unsigned short status ;
1452    unsigned short magic ;   1452    unsigned short magic ;
1453    unsigned long _fxsr_env[6] ;   1453    unsigned long _fxsr_env[6] ;
1454    unsigned long mxcsr ;   1454    unsigned long mxcsr ;
1455    unsigned long reserved ;   1455    unsigned long reserved ;
1456    struct _vki_fpxreg _fxsr_st[8] ;   1456    struct _vki_fpxreg _fxsr_st[8] ;
1457    struct _vki_xmmreg _xmm[8] ;   1457    struct _vki_xmmreg _xmm[8] ;
1458    unsigned long padding[56] ;   1458    unsigned long padding[56] ;
1459 };   1459 };
1460 struct vki_sigcontext {   1460 struct vki_sigcontext {
1461    unsigned short gs ;   1461    unsigned short gs ;
1462    unsigned short __gsh ;   1462    unsigned short __gsh ;
1463    unsigned short fs ;   1463    unsigned short fs ;
1464    unsigned short __fsh ;   1464    unsigned short __fsh ;
1465    unsigned short es ;   1465    unsigned short es ;
1466    unsigned short __esh ;   1466    unsigned short __esh ;
1467    unsigned short ds ;   1467    unsigned short ds ;
1468    unsigned short __dsh ;   1468    unsigned short __dsh ;
1469    unsigned long edi ;   1469    unsigned long edi ;
1470    unsigned long esi ;   1470    unsigned long esi ;
1471    unsigned long ebp ;   1471    unsigned long ebp ;
1472    unsigned long esp ;   1472    unsigned long esp ;
1473    unsigned long ebx ;   1473    unsigned long ebx ;
1474    unsigned long edx ;   1474    unsigned long edx ;
1475    unsigned long ecx ;   1475    unsigned long ecx ;
1476    unsigned long eax ;   1476    unsigned long eax ;
1477    unsigned long trapno ;   1477    unsigned long trapno ;
1478    unsigned long err ;   1478    unsigned long err ;
1479    unsigned long eip ;   1479    unsigned long eip ;
1480    unsigned short cs ;   1480    unsigned short cs ;
1481    unsigned short __csh ;   1481    unsigned short __csh ;
1482    unsigned long eflags ;   1482    unsigned long eflags ;
1483    unsigned long esp_at_signal ;   1483    unsigned long esp_at_signal ;
1484    unsigned short ss ;   1484    unsigned short ss ;
1485    unsigned short __ssh ;   1485    unsigned short __ssh ;
1486    struct _vki_fpstate *fpstate ;   1486    struct _vki_fpstate *fpstate ;
1487    unsigned long oldmask ;   1487    unsigned long oldmask ;
1488    unsigned long cr2 ;   1488    unsigned long cr2 ;
1489 };   1489 };
1490 struct vki_stat {   1490 struct vki_stat {
1491    unsigned long st_dev ;   1491    unsigned long st_dev ;
1492    unsigned long st_ino ;   1492    unsigned long st_ino ;
1493    unsigned short st_mode ;   1493    unsigned short st_mode ;
1494    unsigned short st_nlink ;   1494    unsigned short st_nlink ;
1495    unsigned short st_uid ;   1495    unsigned short st_uid ;
1496    unsigned short st_gid ;   1496    unsigned short st_gid ;
1497    unsigned long st_rdev ;   1497    unsigned long st_rdev ;
1498    unsigned long st_size ;   1498    unsigned long st_size ;
1499    unsigned long st_blksize ;   1499    unsigned long st_blksize ;
1500    unsigned long st_blocks ;   1500    unsigned long st_blocks ;
1501    unsigned long st_atime ;   1501    unsigned long st_atime ;
1502    unsigned long st_atime_nsec ;   1502    unsigned long st_atime_nsec ;
1503    unsigned long st_mtime ;   1503    unsigned long st_mtime ;
1504    unsigned long st_mtime_nsec ;   1504    unsigned long st_mtime_nsec ;
1505    unsigned long st_ctime ;   1505    unsigned long st_ctime ;
1506    unsigned long st_ctime_nsec ;   1506    unsigned long st_ctime_nsec ;
1507    unsigned long __unused4 ;   1507    unsigned long __unused4 ;
1508    unsigned long __unused5 ;   1508    unsigned long __unused5 ;
1509 };   1509 };
1510 struct vki_stat64 {   1510 struct vki_stat64 {
1511    unsigned long long st_dev ;   1511    unsigned long long st_dev ;
1512    unsigned char __pad0[4] ;   1512    unsigned char __pad0[4] ;
1513    unsigned long __st_ino ;   1513    unsigned long __st_ino ;
1514    unsigned int st_mode ;   1514    unsigned int st_mode ;
1515    unsigned int st_nlink ;   1515    unsigned int st_nlink ;
1516    unsigned long st_uid ;   1516    unsigned long st_uid ;
1517    unsigned long st_gid ;   1517    unsigned long st_gid ;
1518    unsigned long long st_rdev ;   1518    unsigned long long st_rdev ;
1519    unsigned char __pad3[4] ;   1519    unsigned char __pad3[4] ;
1520    long long st_size ;   1520    long long st_size ;
1521    unsigned long st_blksize ;   1521    unsigned long st_blksize ;
1522    unsigned long st_blocks ;   1522    unsigned long st_blocks ;
1523    unsigned long __pad4 ;   1523    unsigned long __pad4 ;
1524    unsigned long st_atime ;   1524    unsigned long st_atime ;
1525    unsigned long st_atime_nsec ;   1525    unsigned long st_atime_nsec ;
1526    unsigned long st_mtime ;   1526    unsigned long st_mtime ;
1527    unsigned int st_mtime_nsec ;   1527    unsigned int st_mtime_nsec ;
1528    unsigned long st_ctime ;   1528    unsigned long st_ctime ;
1529    unsigned long st_ctime_nsec ;   1529    unsigned long st_ctime_nsec ;
1530    unsigned long long st_ino ;   1530    unsigned long long st_ino ;
1531 };   1531 };
1532 struct vki_statfs {   1532 struct vki_statfs {
1533    __vki_u32 f_type ;   1533    __vki_u32 f_type ;
1534    __vki_u32 f_bsize ;   1534    __vki_u32 f_bsize ;
1535    __vki_u32 f_blocks ;   1535    __vki_u32 f_blocks ;
1536    __vki_u32 f_bfree ;   1536    __vki_u32 f_bfree ;
1537    __vki_u32 f_bavail ;   1537    __vki_u32 f_bavail ;
1538    __vki_u32 f_files ;   1538    __vki_u32 f_files ;
1539    __vki_u32 f_ffree ;   1539    __vki_u32 f_ffree ;
1540    __vki_kernel_fsid_t f_fsid ;   1540    __vki_kernel_fsid_t f_fsid ;
1541    __vki_u32 f_namelen ;   1541    __vki_u32 f_namelen ;
1542    __vki_u32 f_frsize ;   1542    __vki_u32 f_frsize ;
1543    __vki_u32 f_spare[5] ;   1543    __vki_u32 f_spare[5] ;
1544 };   1544 };
1545 struct vki_winsize {   1545 struct vki_winsize {
1546    unsigned short ws_row ;   1546    unsigned short ws_row ;
1547    unsigned short ws_col ;   1547    unsigned short ws_col ;
1548    unsigned short ws_xpixel ;   1548    unsigned short ws_xpixel ;
1549    unsigned short ws_ypixel ;   1549    unsigned short ws_ypixel ;
1550 };   1550 };
1551 struct vki_termio {   1551 struct vki_termio {
1552    unsigned short c_iflag ;   1552    unsigned short c_iflag ;
1553    unsigned short c_oflag ;   1553    unsigned short c_oflag ;
1554    unsigned short c_cflag ;   1554    unsigned short c_cflag ;
1555    unsigned short c_lflag ;   1555    unsigned short c_lflag ;
1556    unsigned char c_line ;   1556    unsigned char c_line ;
1557    unsigned char c_cc[8] ;   1557    unsigned char c_cc[8] ;
1558 };   1558 };
1559 typedef unsigned char vki_cc_t;   1559 typedef unsigned char vki_cc_t;
1560 typedef unsigned int vki_tcflag_t;   1560 typedef unsigned int vki_tcflag_t;
1561 struct vki_termios {   1561 struct vki_termios {
1562    vki_tcflag_t c_iflag ;   1562    vki_tcflag_t c_iflag ;
1563    vki_tcflag_t c_oflag ;   1563    vki_tcflag_t c_oflag ;
1564    vki_tcflag_t c_cflag ;   1564    vki_tcflag_t c_cflag ;
1565    vki_tcflag_t c_lflag ;   1565    vki_tcflag_t c_lflag ;
1566    vki_cc_t c_line ;   1566    vki_cc_t c_line ;
1567    vki_cc_t c_cc[19] ;   1567    vki_cc_t c_cc[19] ;
1568 };   1568 };
1569 struct vki_pollfd {   1569 struct vki_pollfd {
1570    int fd ;   1570    int fd ;
1571    short events ;   1571    short events ;
1572    short revents ;   1572    short revents ;
1573 };   1573 };
1574 struct vki_user_i387_struct {   1574 struct vki_user_i387_struct {
1575    long cwd ;   1575    long cwd ;
1576    long swd ;   1576    long swd ;
1577    long twd ;   1577    long twd ;
1578    long fip ;   1578    long fip ;
1579    long fcs ;   1579    long fcs ;
1580    long foo ;   1580    long foo ;
1581    long fos ;   1581    long fos ;
1582    long st_space[20] ;   1582    long st_space[20] ;
1583 };   1583 };
1584 struct vki_user_fxsr_struct {   1584 struct vki_user_fxsr_struct {
1585    unsigned short cwd ;   1585    unsigned short cwd ;
1586    unsigned short swd ;   1586    unsigned short swd ;
1587    unsigned short twd ;   1587    unsigned short twd ;
1588    unsigned short fop ;   1588    unsigned short fop ;
1589    long fip ;   1589    long fip ;
1590    long fcs ;   1590    long fcs ;
1591    long foo ;   1591    long foo ;
1592    long fos ;   1592    long fos ;
1593    long mxcsr ;   1593    long mxcsr ;
1594    long reserved ;   1594    long reserved ;
1595    long st_space[32] ;   1595    long st_space[32] ;
1596    long xmm_space[32] ;   1596    long xmm_space[32] ;
1597    long padding[56] ;   1597    long padding[56] ;
1598 };   1598 };
1599 struct vki_user_regs_struct {   1599 struct vki_user_regs_struct {
1600    long ebx ;   1600    long ebx ;
1601    long ecx ;   1601    long ecx ;
1602    long edx ;   1602    long edx ;
1603    long esi ;   1603    long esi ;
1604    long edi ;   1604    long edi ;
1605    long ebp ;   1605    long ebp ;
1606    long eax ;   1606    long eax ;
1607    unsigned short ds ;   1607    unsigned short ds ;
1608    unsigned short __ds ;   1608    unsigned short __ds ;
1609    unsigned short es ;   1609    unsigned short es ;
1610    unsigned short __es ;   1610    unsigned short __es ;
1611    unsigned short fs ;   1611    unsigned short fs ;
1612    unsigned short __fs ;   1612    unsigned short __fs ;
1613    unsigned short gs ;   1613    unsigned short gs ;
1614    unsigned short __gs ;   1614    unsigned short __gs ;
1615    long orig_eax ;   1615    long orig_eax ;
1616    long eip ;   1616    long eip ;
1617    unsigned short cs ;   1617    unsigned short cs ;
1618    unsigned short __cs ;   1618    unsigned short __cs ;
1619    long eflags ;   1619    long eflags ;
1620    long esp ;   1620    long esp ;
1621    unsigned short ss ;   1621    unsigned short ss ;
1622    unsigned short __ss ;   1622    unsigned short __ss ;
1623 };   1623 };
1624 typedef unsigned long vki_elf_greg_t;   1624 typedef unsigned long vki_elf_greg_t;
1625 typedef vki_elf_greg_t vki_elf_gregset_t[sizeof(struct vki_user_regs_struct ) / sizeof(vki_elf_greg_t )];   1625 typedef vki_elf_greg_t vki_elf_gregset_t[sizeof(struct vki_user_regs_struct ) / sizeof(vki_elf_greg_t )];
1626 typedef struct vki_user_i387_struct vki_elf_fpregset_t;   1626 typedef struct vki_user_i387_struct vki_elf_fpregset_t;
1627 typedef struct vki_user_fxsr_struct vki_elf_fpxregset_t;   1627 typedef struct vki_user_fxsr_struct vki_elf_fpxregset_t;
1628 struct vki_ucontext {   1628 struct vki_ucontext {
1629    unsigned long uc_flags ;   1629    unsigned long uc_flags ;
1630    struct vki_ucontext *uc_link ;   1630    struct vki_ucontext *uc_link ;
1631    vki_stack_t uc_stack ;   1631    vki_stack_t uc_stack ;
1632    struct vki_sigcontext uc_mcontext ;   1632    struct vki_sigcontext uc_mcontext ;
1633    vki_sigset_t uc_sigmask ;   1633    vki_sigset_t uc_sigmask ;
1634 };   1634 };
1635 struct vki_user_desc {   1635 struct vki_user_desc {
1636    unsigned int entry_number ;   1636    unsigned int entry_number ;
1637    unsigned long base_addr ;   1637    unsigned long base_addr ;
1638    unsigned int limit ;   1638    unsigned int limit ;
1639    unsigned int seg_32bit : 1 ;   1639    unsigned int seg_32bit : 1 ;
1640    unsigned int contents : 2 ;   1640    unsigned int contents : 2 ;
1641    unsigned int read_exec_only : 1 ;   1641    unsigned int read_exec_only : 1 ;
1642    unsigned int limit_in_pages : 1 ;   1642    unsigned int limit_in_pages : 1 ;
1643    unsigned int seg_not_present : 1 ;   1643    unsigned int seg_not_present : 1 ;
1644    unsigned int useable : 1 ;   1644    unsigned int useable : 1 ;
1645    unsigned int reserved : 25 ;   1645    unsigned int reserved : 25 ;
1646 };   1646 };
1647 typedef struct vki_user_desc vki_modify_ldt_t;   1647 typedef struct vki_user_desc vki_modify_ldt_t;
1648 struct vki_ipc64_perm {   1648 struct vki_ipc64_perm {
1649    __vki_kernel_key_t key ;   1649    __vki_kernel_key_t key ;
1650    __vki_kernel_uid32_t uid ;   1650    __vki_kernel_uid32_t uid ;
1651    __vki_kernel_gid32_t gid ;   1651    __vki_kernel_gid32_t gid ;
1652    __vki_kernel_uid32_t cuid ;   1652    __vki_kernel_uid32_t cuid ;
1653    __vki_kernel_gid32_t cgid ;   1653    __vki_kernel_gid32_t cgid ;
1654    __vki_kernel_mode_t mode ;   1654    __vki_kernel_mode_t mode ;
1655    unsigned short __pad1 ;   1655    unsigned short __pad1 ;
1656    unsigned short seq ;   1656    unsigned short seq ;
1657    unsigned short __pad2 ;   1657    unsigned short __pad2 ;
1658    unsigned long __unused1 ;   1658    unsigned long __unused1 ;
1659    unsigned long __unused2 ;   1659    unsigned long __unused2 ;
1660 };   1660 };
1661 struct vki_semid64_ds {   1661 struct vki_semid64_ds {
1662    struct vki_ipc64_perm sem_perm ;   1662    struct vki_ipc64_perm sem_perm ;
1663    __vki_kernel_time_t sem_otime ;   1663    __vki_kernel_time_t sem_otime ;
1664    unsigned long __unused1 ;   1664    unsigned long __unused1 ;
1665    __vki_kernel_time_t sem_ctime ;   1665    __vki_kernel_time_t sem_ctime ;
1666    unsigned long __unused2 ;   1666    unsigned long __unused2 ;
1667    unsigned long sem_nsems ;   1667    unsigned long sem_nsems ;
1668    unsigned long __unused3 ;   1668    unsigned long __unused3 ;
1669    unsigned long __unused4 ;   1669    unsigned long __unused4 ;
1670 };   1670 };
1671 struct vki_msqid64_ds {   1671 struct vki_msqid64_ds {
1672    struct vki_ipc64_perm msg_perm ;   1672    struct vki_ipc64_perm msg_perm ;
1673    __vki_kernel_time_t msg_stime ;   1673    __vki_kernel_time_t msg_stime ;
1674    unsigned long __unused1 ;   1674    unsigned long __unused1 ;
1675    __vki_kernel_time_t msg_rtime ;   1675    __vki_kernel_time_t msg_rtime ;
1676    unsigned long __unused2 ;   1676    unsigned long __unused2 ;
1677    __vki_kernel_time_t msg_ctime ;   1677    __vki_kernel_time_t msg_ctime ;
1678    unsigned long __unused3 ;   1678    unsigned long __unused3 ;
1679    unsigned long msg_cbytes ;   1679    unsigned long msg_cbytes ;
1680    unsigned long msg_qnum ;   1680    unsigned long msg_qnum ;
1681    unsigned long msg_qbytes ;   1681    unsigned long msg_qbytes ;
1682    __vki_kernel_pid_t msg_lspid ;   1682    __vki_kernel_pid_t msg_lspid ;
1683    __vki_kernel_pid_t msg_lrpid ;   1683    __vki_kernel_pid_t msg_lrpid ;
1684    unsigned long __unused4 ;   1684    unsigned long __unused4 ;
1685    unsigned long __unused5 ;   1685    unsigned long __unused5 ;
1686 };   1686 };
1687 struct vki_msgbuf;   1687 struct vki_msgbuf;
1688 struct vki_ipc_kludge {   1688 struct vki_ipc_kludge {
1689    struct vki_msgbuf *msgp ;   1689    struct vki_msgbuf *msgp ;
1690    long msgtyp ;   1690    long msgtyp ;
1691 };   1691 };
1692 struct vki_shmid64_ds {   1692 struct vki_shmid64_ds {
1693    struct vki_ipc64_perm shm_perm ;   1693    struct vki_ipc64_perm shm_perm ;
1694    vki_size_t shm_segsz ;   1694    vki_size_t shm_segsz ;
1695    __vki_kernel_time_t shm_atime ;   1695    __vki_kernel_time_t shm_atime ;
1696    unsigned long __unused1 ;   1696    unsigned long __unused1 ;
1697    __vki_kernel_time_t shm_dtime ;   1697    __vki_kernel_time_t shm_dtime ;
1698    unsigned long __unused2 ;   1698    unsigned long __unused2 ;
1699    __vki_kernel_time_t shm_ctime ;   1699    __vki_kernel_time_t shm_ctime ;
1700    unsigned long __unused3 ;   1700    unsigned long __unused3 ;
1701    __vki_kernel_pid_t shm_cpid ;   1701    __vki_kernel_pid_t shm_cpid ;
1702    __vki_kernel_pid_t shm_lpid ;   1702    __vki_kernel_pid_t shm_lpid ;
1703    unsigned long shm_nattch ;   1703    unsigned long shm_nattch ;
1704    unsigned long __unused4 ;   1704    unsigned long __unused4 ;
1705    unsigned long __unused5 ;   1705    unsigned long __unused5 ;
1706 };   1706 };
1707 struct vki_shminfo64 {   1707 struct vki_shminfo64 {
1708    unsigned long shmmax ;   1708    unsigned long shmmax ;
1709    unsigned long shmmin ;   1709    unsigned long shmmin ;
1710    unsigned long shmmni ;   1710    unsigned long shmmni ;
1711    unsigned long shmseg ;   1711    unsigned long shmseg ;
1712    unsigned long shmall ;   1712    unsigned long shmall ;
1713    unsigned long __unused1 ;   1713    unsigned long __unused1 ;
1714    unsigned long __unused2 ;   1714    unsigned long __unused2 ;
1715    unsigned long __unused3 ;   1715    unsigned long __unused3 ;
1716    unsigned long __unused4 ;   1716    unsigned long __unused4 ;
1717 };   1717 };
1718 struct vki_vm86_regs {   1718 struct vki_vm86_regs {
1719    long ebx ;   1719    long ebx ;
1720    long ecx ;   1720    long ecx ;
1721    long edx ;   1721    long edx ;
1722    long esi ;   1722    long esi ;
1723    long edi ;   1723    long edi ;
1724    long ebp ;   1724    long ebp ;
1725    long eax ;   1725    long eax ;
1726    long __null_ds ;   1726    long __null_ds ;
1727    long __null_es ;   1727    long __null_es ;
1728    long __null_fs ;   1728    long __null_fs ;
1729    long __null_gs ;   1729    long __null_gs ;
1730    long orig_eax ;   1730    long orig_eax ;
1731    long eip ;   1731    long eip ;
1732    unsigned short cs ;   1732    unsigned short cs ;
1733    unsigned short __csh ;   1733    unsigned short __csh ;
1734    long eflags ;   1734    long eflags ;
1735    long esp ;   1735    long esp ;
1736    unsigned short ss ;   1736    unsigned short ss ;
1737    unsigned short __ssh ;   1737    unsigned short __ssh ;
1738    unsigned short es ;   1738    unsigned short es ;
1739    unsigned short __esh ;   1739    unsigned short __esh ;
1740    unsigned short ds ;   1740    unsigned short ds ;
1741    unsigned short __dsh ;   1741    unsigned short __dsh ;
1742    unsigned short fs ;   1742    unsigned short fs ;
1743    unsigned short __fsh ;   1743    unsigned short __fsh ;
1744    unsigned short gs ;   1744    unsigned short gs ;
1745    unsigned short __gsh ;   1745    unsigned short __gsh ;
1746 };   1746 };
1747 struct vki_revectored_struct {   1747 struct vki_revectored_struct {
1748    unsigned long __map[8] ;   1748    unsigned long __map[8] ;
1749 };   1749 };
1750 struct vki_vm86_struct {   1750 struct vki_vm86_struct {
1751    struct vki_vm86_regs regs ;   1751    struct vki_vm86_regs regs ;
1752    unsigned long flags ;   1752    unsigned long flags ;
1753    unsigned long screen_bitmap ;   1753    unsigned long screen_bitmap ;
1754    unsigned long cpu_type ;   1754    unsigned long cpu_type ;
1755    struct vki_revectored_struct int_revectored ;   1755    struct vki_revectored_struct int_revectored ;
1756    struct vki_revectored_struct int21_revectored ;   1756    struct vki_revectored_struct int21_revectored ;
1757 };   1757 };
1758 struct vki_vm86plus_info_struct {   1758 struct vki_vm86plus_info_struct {
1759    unsigned long force_return_for_pic : 1 ;   1759    unsigned long force_return_for_pic : 1 ;
1760    unsigned long vm86dbg_active : 1 ;   1760    unsigned long vm86dbg_active : 1 ;
1761    unsigned long vm86dbg_TFpendig : 1 ;   1761    unsigned long vm86dbg_TFpendig : 1 ;
1762    unsigned long unused : 28 ;   1762    unsigned long unused : 28 ;
1763    unsigned long is_vm86pus : 1 ;   1763    unsigned long is_vm86pus : 1 ;
1764    unsigned char vm86dbg_intxxtab[32] ;   1764    unsigned char vm86dbg_intxxtab[32] ;
1765 };   1765 };
1766 struct vki_vm86plus_struct {   1766 struct vki_vm86plus_struct {
1767    struct vki_vm86_regs regs ;   1767    struct vki_vm86_regs regs ;
1768    unsigned long flags ;   1768    unsigned long flags ;
1769    unsigned long screen_bitmap ;   1769    unsigned long screen_bitmap ;
1770    unsigned long cpu_type ;   1770    unsigned long cpu_type ;
1771    struct vki_revectored_struct int_revectored ;   1771    struct vki_revectored_struct int_revectored ;
1772    struct vki_revectored_struct int21_revectored ;   1772    struct vki_revectored_struct int21_revectored ;
1773    struct vki_vm86plus_info_struct vm86plus ;   1773    struct vki_vm86plus_info_struct vm86plus ;
1774 };   1774 };
1775 typedef __vki_s32 vki_int32_t;   1775 typedef __vki_s32 vki_int32_t;
1776 typedef __vki_u8 vki_uint8_t;   1776 typedef __vki_u8 vki_uint8_t;
1777 typedef __vki_u16 vki_uint16_t;   1777 typedef __vki_u16 vki_uint16_t;
1778 typedef __vki_u32 vki_uint32_t;   1778 typedef __vki_u32 vki_uint32_t;
1779 struct vki_sysinfo {   1779 struct vki_sysinfo {
1780    long uptime ;   1780    long uptime ;
1781    unsigned long loads[3] ;   1781    unsigned long loads[3] ;
1782    unsigned long totalram ;   1782    unsigned long totalram ;
1783    unsigned long freeram ;   1783    unsigned long freeram ;
1784    unsigned long sharedram ;   1784    unsigned long sharedram ;
1785    unsigned long bufferram ;   1785    unsigned long bufferram ;
1786    unsigned long totalswap ;   1786    unsigned long totalswap ;
1787    unsigned long freeswap ;   1787    unsigned long freeswap ;
1788    unsigned short procs ;   1788    unsigned short procs ;
1789    unsigned short pad ;   1789    unsigned short pad ;
1790    unsigned long totalhigh ;   1790    unsigned long totalhigh ;
1791    unsigned long freehigh ;   1791    unsigned long freehigh ;
1792    unsigned int mem_unit ;   1792    unsigned int mem_unit ;
1793    char _f[(20U - 2U * sizeof(long )) - sizeof(int )] ;   1793    char _f[(20U - 2U * sizeof(long )) - sizeof(int )] ;
1794 };   1794 };
1795 struct vki_timespec {   1795 struct vki_timespec {
1796    vki_time_t tv_sec ;   1796    vki_time_t tv_sec ;
1797    long tv_nsec ;   1797    long tv_nsec ;
1798 };   1798 };
1799 struct vki_timeval {   1799 struct vki_timeval {
1800    vki_time_t tv_sec ;   1800    vki_time_t tv_sec ;
1801    vki_suseconds_t tv_usec ;   1801    vki_suseconds_t tv_usec ;
1802 };   1802 };
1803 struct vki_timezone {   1803 struct vki_timezone {
1804    int tz_minuteswest ;   1804    int tz_minuteswest ;
1805    int tz_dsttime ;   1805    int tz_dsttime ;
1806 };   1806 };
1807 struct vki_itimerspec {   1807 struct vki_itimerspec {
1808    struct vki_timespec it_interval ;   1808    struct vki_timespec it_interval ;
1809    struct vki_timespec it_value ;   1809    struct vki_timespec it_value ;
1810 };   1810 };
1811 struct vki_itimerval {   1811 struct vki_itimerval {
1812    struct vki_timeval it_interval ;   1812    struct vki_timeval it_interval ;
1813    struct vki_timeval it_value ;   1813    struct vki_timeval it_value ;
1814 };   1814 };
1815 struct vki_timex {   1815 struct vki_timex {
1816    unsigned int modes ;   1816    unsigned int modes ;
1817    long offset ;   1817    long offset ;
1818    long freq ;   1818    long freq ;
1819    long maxerror ;   1819    long maxerror ;
1820    long esterror ;   1820    long esterror ;
1821    int status ;   1821    int status ;
1822    long constant ;   1822    long constant ;
1823    long precision ;   1823    long precision ;
1824    long tolerance ;   1824    long tolerance ;
1825    struct vki_timeval time ;   1825    struct vki_timeval time ;
1826    long tick ;   1826    long tick ;
1827    long ppsfreq ;   1827    long ppsfreq ;
1828    long jitter ;   1828    long jitter ;
1829    int shift ;   1829    int shift ;
1830    long stabil ;   1830    long stabil ;
1831    long jitcnt ;   1831    long jitcnt ;
1832    long calcnt ;   1832    long calcnt ;
1833    long errcnt ;   1833    long errcnt ;
1834    long stbcnt ;   1834    long stbcnt ;
1835    int  : 32 ;   1835    int  : 32 ;
1836    int  : 32 ;   1836    int  : 32 ;
1837    int  : 32 ;   1837    int  : 32 ;
1838    int  : 32 ;   1838    int  : 32 ;
1839    int  : 32 ;   1839    int  : 32 ;
1840    int  : 32 ;   1840    int  : 32 ;
1841    int  : 32 ;   1841    int  : 32 ;
1842    int  : 32 ;   1842    int  : 32 ;
1843    int  : 32 ;   1843    int  : 32 ;
1844    int  : 32 ;   1844    int  : 32 ;
1845    int  : 32 ;   1845    int  : 32 ;
1846    int  : 32 ;   1846    int  : 32 ;
1847 };   1847 };
1848 struct vki_tms {   1848 struct vki_tms {
1849    vki_clock_t tms_utime ;   1849    vki_clock_t tms_utime ;
1850    vki_clock_t tms_stime ;   1850    vki_clock_t tms_stime ;
1851    vki_clock_t tms_cutime ;   1851    vki_clock_t tms_cutime ;
1852    vki_clock_t tms_cstime ;   1852    vki_clock_t tms_cstime ;
1853 };   1853 };
1854 struct vki_utimbuf {   1854 struct vki_utimbuf {
1855    vki_time_t actime ;   1855    vki_time_t actime ;
1856    vki_time_t modtime ;   1856    vki_time_t modtime ;
1857 };   1857 };
1858 struct vki_sched_param {   1858 struct vki_sched_param {
1859    int sched_priority ;   1859    int sched_priority ;
1860 };   1860 };
1861 union vki_sigval {   1861 union vki_sigval {
1862    int sival_int ;   1862    int sival_int ;
1863    void *sival_ptr ;   1863    void *sival_ptr ;
1864 };   1864 };
1865 typedef union vki_sigval vki_sigval_t;   1865 typedef union vki_sigval vki_sigval_t;
1866 struct __anonstruct__kill_76 {   1866 struct __anonstruct__kill_76 {
1867    vki_pid_t _pid ;   1867    vki_pid_t _pid ;
1868    vki_uid_t _uid ;   1868    vki_uid_t _uid ;
1869 };   1869 };
1870 struct __anonstruct__timer_77 {   1870 struct __anonstruct__timer_77 {
1871    vki_timer_t _tid ;   1871    vki_timer_t _tid ;
1872    int _overrun ;   1872    int _overrun ;
1873    char _pad[sizeof(vki_uid_t ) - sizeof(int )] ;   1873    char _pad[sizeof(vki_uid_t ) - sizeof(int )] ;
1874    vki_sigval_t _sigval ;   1874    vki_sigval_t _sigval ;
1875    int _sys_private ;   1875    int _sys_private ;
1876 };   1876 };
1877 struct __anonstruct__rt_78 {   1877 struct __anonstruct__rt_78 {
1878    vki_pid_t _pid ;   1878    vki_pid_t _pid ;
1879    vki_uid_t _uid ;   1879    vki_uid_t _uid ;
1880    vki_sigval_t _sigval ;   1880    vki_sigval_t _sigval ;
1881 };   1881 };
1882 struct __anonstruct__sigchld_79 {   1882 struct __anonstruct__sigchld_79 {
1883    vki_pid_t _pid ;   1883    vki_pid_t _pid ;
1884    vki_uid_t _uid ;   1884    vki_uid_t _uid ;
1885    int _status ;   1885    int _status ;
1886    vki_clock_t _utime ;   1886    vki_clock_t _utime ;
1887    vki_clock_t _stime ;   1887    vki_clock_t _stime ;
1888 };   1888 };
1889 struct __anonstruct__sigfault_80 {   1889 struct __anonstruct__sigfault_80 {
1890    void *_addr ;   1890    void *_addr ;
1891 };   1891 };
1892 struct __anonstruct__sigpoll_81 {   1892 struct __anonstruct__sigpoll_81 {
1893    long _band ;   1893    long _band ;
1894    int _fd ;   1894    int _fd ;
1895 };   1895 };
1896 union __anonunion__sifields_75 {   1896 union __anonunion__sifields_75 {
1897    int _pad[(128U - 3U * sizeof(int )) / sizeof(int )] ;   1897    int _pad[(128U - 3U * sizeof(int )) / sizeof(int )] ;
1898    struct __anonstruct__kill_76 _kill ;   1898    struct __anonstruct__kill_76 _kill ;
1899    struct __anonstruct__timer_77 _timer ;   1899    struct __anonstruct__timer_77 _timer ;
1900    struct __anonstruct__rt_78 _rt ;   1900    struct __anonstruct__rt_78 _rt ;
1901    struct __anonstruct__sigchld_79 _sigchld ;   1901    struct __anonstruct__sigchld_79 _sigchld ;
1902    struct __anonstruct__sigfault_80 _sigfault ;   1902    struct __anonstruct__sigfault_80 _sigfault ;
1903    struct __anonstruct__sigpoll_81 _sigpoll ;   1903    struct __anonstruct__sigpoll_81 _sigpoll ;
1904 };   1904 };
1905 struct vki_siginfo {   1905 struct vki_siginfo {
1906    int si_signo ;   1906    int si_signo ;
1907    int si_errno ;   1907    int si_errno ;
1908    int si_code ;   1908    int si_code ;
1909    union __anonunion__sifields_75 _sifields ;   1909    union __anonunion__sifields_75 _sifields ;
1910 };   1910 };
1911 typedef struct vki_siginfo vki_siginfo_t;   1911 typedef struct vki_siginfo vki_siginfo_t;
1912 struct __anonstruct__sigev_thread_83 {   1912 struct __anonstruct__sigev_thread_83 {
1913    void (*_function)(vki_sigval_t  ) ;   1913    void (*_function)(vki_sigval_t  ) ;
1914    void *_attribute ;   1914    void *_attribute ;
1915 };   1915 };
1916 union __anonunion__sigev_un_82 {   1916 union __anonunion__sigev_un_82 {
1917    int _pad[(64U - (sizeof(int ) * 2U + sizeof(vki_sigval_t ))) / sizeof(int )] ;   1917    int _pad[(64U - (sizeof(int ) * 2U + sizeof(vki_sigval_t ))) / sizeof(int )] ;
1918    int _tid ;   1918    int _tid ;
1919    struct __anonstruct__sigev_thread_83 _sigev_thread ;   1919    struct __anonstruct__sigev_thread_83 _sigev_thread ;
1920 };   1920 };
1921 struct vki_sigevent {   1921 struct vki_sigevent {
1922    vki_sigval_t sigev_value ;   1922    vki_sigval_t sigev_value ;
1923    int sigev_signo ;   1923    int sigev_signo ;
1924    int sigev_notify ;   1924    int sigev_notify ;
1925    union __anonunion__sigev_un_82 _sigev_un ;   1925    union __anonunion__sigev_un_82 _sigev_un ;
1926 };   1926 };
1927 typedef struct vki_sigevent vki_sigevent_t;   1927 typedef struct vki_sigevent vki_sigevent_t;
1928 enum vki_sock_type {   1928 enum vki_sock_type {
1929     VKI_SOCK_STREAM = 1   1929     VKI_SOCK_STREAM = 1
1930 } ;   1930 } ;
1931 struct vki_iovec {   1931 struct vki_iovec {
1932    void *iov_base ;   1932    void *iov_base ;
1933    __vki_kernel_size_t iov_len ;   1933    __vki_kernel_size_t iov_len ;
1934 };   1934 };
1935 typedef unsigned short vki_sa_family_t;   1935 typedef unsigned short vki_sa_family_t;
1936 struct vki_sockaddr {   1936 struct vki_sockaddr {
1937    vki_sa_family_t sa_family ;   1937    vki_sa_family_t sa_family ;
1938    char sa_data[14] ;   1938    char sa_data[14] ;
1939 };   1939 };
1940 struct vki_msghdr {   1940 struct vki_msghdr {
1941    void *msg_name ;   1941    void *msg_name ;
1942    int msg_namelen ;   1942    int msg_namelen ;
1943    struct vki_iovec *msg_iov ;   1943    struct vki_iovec *msg_iov ;
1944    __vki_kernel_size_t msg_iovlen ;   1944    __vki_kernel_size_t msg_iovlen ;
1945    void *msg_control ;   1945    void *msg_control ;
1946    __vki_kernel_size_t msg_controllen ;   1946    __vki_kernel_size_t msg_controllen ;
1947    unsigned int msg_flags ;   1947    unsigned int msg_flags ;
1948 };   1948 };
1949 struct vki_cmsghdr {   1949 struct vki_cmsghdr {
1950    __vki_kernel_size_t cmsg_len ;   1950    __vki_kernel_size_t cmsg_len ;
1951    int cmsg_level ;   1951    int cmsg_level ;
1952    int cmsg_type ;   1952    int cmsg_type ;
1953 };   1953 };
1954 struct vki_in_addr {   1954 struct vki_in_addr {
1955    __vki_u32 s_addr ;   1955    __vki_u32 s_addr ;
1956 };   1956 };
1957 struct vki_sockaddr_in {   1957 struct vki_sockaddr_in {
1958    vki_sa_family_t sin_family ;   1958    vki_sa_family_t sin_family ;
1959    unsigned short sin_port ;   1959    unsigned short sin_port ;
1960    struct vki_in_addr sin_addr ;   1960    struct vki_in_addr sin_addr ;
1961    unsigned char __pad[((16U - sizeof(short )) - sizeof(unsigned short )) - sizeof(struct vki_in_addr )] ;   1961    unsigned char __pad[((16U - sizeof(short )) - sizeof(unsigned short )) - sizeof(struct vki_in_addr )] ;
1962 };   1962 };
1963 union __anonunion_vki_in6_u_84 {   1963 union __anonunion_vki_in6_u_84 {
1964    __vki_u8 u6_addr8[16] ;   1964    __vki_u8 u6_addr8[16] ;
1965    __vki_u16 u6_addr16[8] ;   1965    __vki_u16 u6_addr16[8] ;
1966    __vki_u32 u6_addr32[4] ;   1966    __vki_u32 u6_addr32[4] ;
1967 };   1967 };
1968 struct vki_in6_addr {   1968 struct vki_in6_addr {
1969    union __anonunion_vki_in6_u_84 vki_in6_u ;   1969    union __anonunion_vki_in6_u_84 vki_in6_u ;
1970 };   1970 };
1971 struct vki_sockaddr_in6 {   1971 struct vki_sockaddr_in6 {
1972    unsigned short sin6_family ;   1972    unsigned short sin6_family ;
1973    __vki_u16 sin6_port ;   1973    __vki_u16 sin6_port ;
1974    __vki_u32 sin6_flowinfo ;   1974    __vki_u32 sin6_flowinfo ;
1975    struct vki_in6_addr sin6_addr ;   1975    struct vki_in6_addr sin6_addr ;
1976    __vki_u32 sin6_scope_id ;   1976    __vki_u32 sin6_scope_id ;
1977 };   1977 };
1978 struct vki_sockaddr_un {   1978 struct vki_sockaddr_un {
1979    vki_sa_family_t sun_family ;   1979    vki_sa_family_t sun_family ;
1980    char sun_path[108] ;   1980    char sun_path[108] ;
1981 };   1981 };
1982 struct vki_ifmap {   1982 struct vki_ifmap {
1983    unsigned long mem_start ;   1983    unsigned long mem_start ;
1984    unsigned long mem_end ;   1984    unsigned long mem_end ;
1985    unsigned short base_addr ;   1985    unsigned short base_addr ;
1986    unsigned char irq ;   1986    unsigned char irq ;
1987    unsigned char dma ;   1987    unsigned char dma ;
1988    unsigned char port ;   1988    unsigned char port ;
1989 };   1989 };
1990 union __anonunion_ifs_ifsu_85 {   1990 union __anonunion_ifs_ifsu_85 {
1991    void *raw_hdlc ;   1991    void *raw_hdlc ;
1992    void *cisco ;   1992    void *cisco ;
1993    void *fr ;   1993    void *fr ;
1994    void *fr_pvc ;   1994    void *fr_pvc ;
1995    void *fr_pvc_info ;   1995    void *fr_pvc_info ;
1996    void *sync ;   1996    void *sync ;
1997    void *te1 ;   1997    void *te1 ;
1998 };   1998 };
1999 struct vki_if_settings {   1999 struct vki_if_settings {
2000    unsigned int type ;   2000    unsigned int type ;
2001    unsigned int size ;   2001    unsigned int size ;
2002    union __anonunion_ifs_ifsu_85 ifs_ifsu ;   2002    union __anonunion_ifs_ifsu_85 ifs_ifsu ;
2003 };   2003 };
2004 union __anonunion_ifr_ifrn_86 {   2004 union __anonunion_ifr_ifrn_86 {
2005    char ifrn_name[16] ;   2005    char ifrn_name[16] ;
2006 };   2006 };
2007 union __anonunion_ifr_ifru_87 {   2007 union __anonunion_ifr_ifru_87 {
2008    struct vki_sockaddr ifru_addr ;   2008    struct vki_sockaddr ifru_addr ;
2009    struct vki_sockaddr ifru_dstaddr ;   2009    struct vki_sockaddr ifru_dstaddr ;
2010    struct vki_sockaddr ifru_broadaddr ;   2010    struct vki_sockaddr ifru_broadaddr ;
2011    struct vki_sockaddr ifru_netmask ;   2011    struct vki_sockaddr ifru_netmask ;
2012    struct vki_sockaddr ifru_hwaddr ;   2012    struct vki_sockaddr ifru_hwaddr ;
2013    short ifru_flags ;   2013    short ifru_flags ;
2014    int ifru_ivalue ;   2014    int ifru_ivalue ;
2015    int ifru_mtu ;   2015    int ifru_mtu ;
2016    struct vki_ifmap ifru_map ;   2016    struct vki_ifmap ifru_map ;
2017    char ifru_slave[16] ;   2017    char ifru_slave[16] ;
2018    char ifru_newname[16] ;   2018    char ifru_newname[16] ;
2019    void *ifru_data ;   2019    void *ifru_data ;
2020    struct vki_if_settings ifru_settings ;   2020    struct vki_if_settings ifru_settings ;
2021 };   2021 };
2022 struct vki_ifreq {   2022 struct vki_ifreq {
2023    union __anonunion_ifr_ifrn_86 ifr_ifrn ;   2023    union __anonunion_ifr_ifrn_86 ifr_ifrn ;
2024    union __anonunion_ifr_ifru_87 ifr_ifru ;   2024    union __anonunion_ifr_ifru_87 ifr_ifru ;
2025 };   2025 };
2026 union __anonunion_ifc_ifcu_88 {   2026 union __anonunion_ifc_ifcu_88 {
2027    char *ifcu_buf ;   2027    char *ifcu_buf ;
2028    struct vki_ifreq *ifcu_req ;   2028    struct vki_ifreq *ifcu_req ;
2029 };   2029 };
2030 struct vki_ifconf {   2030 struct vki_ifconf {
2031    int ifc_len ;   2031    int ifc_len ;
2032    union __anonunion_ifc_ifcu_88 ifc_ifcu ;   2032    union __anonunion_ifc_ifcu_88 ifc_ifcu ;
2033 };   2033 };
2034 struct vki_arpreq {   2034 struct vki_arpreq {
2035    struct vki_sockaddr arp_pa ;   2035    struct vki_sockaddr arp_pa ;
2036    struct vki_sockaddr arp_ha ;   2036    struct vki_sockaddr arp_ha ;
2037    int arp_flags ;   2037    int arp_flags ;
2038    struct vki_sockaddr arp_netmask ;   2038    struct vki_sockaddr arp_netmask ;
2039    char arp_dev[16] ;   2039    char arp_dev[16] ;
2040 };   2040 };
2041 struct vki_rtentry {   2041 struct vki_rtentry {
2042    unsigned long rt_pad1 ;   2042    unsigned long rt_pad1 ;
2043    struct vki_sockaddr rt_dst ;   2043    struct vki_sockaddr rt_dst ;
2044    struct vki_sockaddr rt_gateway ;   2044    struct vki_sockaddr rt_gateway ;
2045    struct vki_sockaddr rt_genmask ;   2045    struct vki_sockaddr rt_genmask ;
2046    unsigned short rt_flags ;   2046    unsigned short rt_flags ;
2047    short rt_pad2 ;   2047    short rt_pad2 ;
2048    unsigned long rt_pad3 ;   2048    unsigned long rt_pad3 ;
2049    void *rt_pad4 ;   2049    void *rt_pad4 ;
2050    short rt_metric ;   2050    short rt_metric ;
2051    char *rt_dev ;   2051    char *rt_dev ;
2052    unsigned long rt_mtu ;   2052    unsigned long rt_mtu ;
2053    unsigned long rt_window ;   2053    unsigned long rt_window ;
2054    unsigned short rt_irtt ;   2054    unsigned short rt_irtt ;
2055 };   2055 };
2056 typedef __vki_s32 vki_sctp_assoc_t;   2056 typedef __vki_s32 vki_sctp_assoc_t;
2057 enum vki_sctp_optname {   2057 enum vki_sctp_optname {
2058     VKI_SCTP_RTOINFO = 0,   2058     VKI_SCTP_RTOINFO = 0,
2059     VKI_SCTP_ASSOCINFO = 1,   2059     VKI_SCTP_ASSOCINFO = 1,
2060     VKI_SCTP_INITMSG = 2,   2060     VKI_SCTP_INITMSG = 2,
2061     VKI_SCTP_NODELAY = 3,   2061     VKI_SCTP_NODELAY = 3,
2062     VKI_SCTP_AUTOCLOSE = 4,   2062     VKI_SCTP_AUTOCLOSE = 4,
2063     VKI_SCTP_SET_PEER_PRIMARY_ADDR = 5,   2063     VKI_SCTP_SET_PEER_PRIMARY_ADDR = 5,
2064     VKI_SCTP_PRIMARY_ADDR = 6,   2064     VKI_SCTP_PRIMARY_ADDR = 6,
2065     VKI_SCTP_ADAPTION_LAYER = 7,   2065     VKI_SCTP_ADAPTION_LAYER = 7,
2066     VKI_SCTP_DISABLE_FRAGMENTS = 8,   2066     VKI_SCTP_DISABLE_FRAGMENTS = 8,
2067     VKI_SCTP_PEER_ADDR_PARAMS = 9,   2067     VKI_SCTP_PEER_ADDR_PARAMS = 9,
2068     VKI_SCTP_DEFAULT_SEND_PARAM = 10,   2068     VKI_SCTP_DEFAULT_SEND_PARAM = 10,
2069     VKI_SCTP_EVENTS = 11,   2069     VKI_SCTP_EVENTS = 11,
2070     VKI_SCTP_I_WANT_MAPPED_V4_ADDR = 12,   2070     VKI_SCTP_I_WANT_MAPPED_V4_ADDR = 12,
2071     VKI_SCTP_MAXSEG = 13,   2071     VKI_SCTP_MAXSEG = 13,
2072     VKI_SCTP_STATUS = 14,   2072     VKI_SCTP_STATUS = 14,
2073     VKI_SCTP_GET_PEER_ADDR_INFO = 15,   2073     VKI_SCTP_GET_PEER_ADDR_INFO = 15,
2074     VKI_SCTP_SOCKOPT_BINDX_ADD = 100,   2074     VKI_SCTP_SOCKOPT_BINDX_ADD = 100,
2075     VKI_SCTP_SOCKOPT_BINDX_REM = 101,   2075     VKI_SCTP_SOCKOPT_BINDX_REM = 101,
2076     VKI_SCTP_SOCKOPT_PEELOFF = 102,   2076     VKI_SCTP_SOCKOPT_PEELOFF = 102,
2077     VKI_SCTP_GET_PEER_ADDRS_NUM = 103,   2077     VKI_SCTP_GET_PEER_ADDRS_NUM = 103,
2078     VKI_SCTP_GET_PEER_ADDRS = 104,   2078     VKI_SCTP_GET_PEER_ADDRS = 104,
2079     VKI_SCTP_GET_LOCAL_ADDRS_NUM = 105,   2079     VKI_SCTP_GET_LOCAL_ADDRS_NUM = 105,
2080     VKI_SCTP_GET_LOCAL_ADDRS = 106,   2080     VKI_SCTP_GET_LOCAL_ADDRS = 106,
2081     VKI_SCTP_SOCKOPT_CONNECTX = 107   2081     VKI_SCTP_SOCKOPT_CONNECTX = 107
2082 } ;   2082 } ;
2083 struct vki_sctp_getaddrs {   2083 struct vki_sctp_getaddrs {
2084    vki_sctp_assoc_t assoc_id ;   2084    vki_sctp_assoc_t assoc_id ;
2085    int addr_num ;   2085    int addr_num ;
2086    struct vki_sockaddr *addrs ;   2086    struct vki_sockaddr *addrs ;
2087 };   2087 };
2088 struct vki_rusage {   2088 struct vki_rusage {
2089    struct vki_timeval ru_utime ;   2089    struct vki_timeval ru_utime ;
2090    struct vki_timeval ru_stime ;   2090    struct vki_timeval ru_stime ;
2091    long ru_maxrss ;   2091    long ru_maxrss ;
2092    long ru_ixrss ;   2092    long ru_ixrss ;
2093    long ru_idrss ;   2093    long ru_idrss ;
2094    long ru_isrss ;   2094    long ru_isrss ;
2095    long ru_minflt ;   2095    long ru_minflt ;
2096    long ru_majflt ;   2096    long ru_majflt ;
2097    long ru_nswap ;   2097    long ru_nswap ;
2098    long ru_inblock ;   2098    long ru_inblock ;
2099    long ru_oublock ;   2099    long ru_oublock ;
2100    long ru_msgsnd ;   2100    long ru_msgsnd ;
2101    long ru_msgrcv ;   2101    long ru_msgrcv ;
2102    long ru_nsignals ;   2102    long ru_nsignals ;
2103    long ru_nvcsw ;   2103    long ru_nvcsw ;
2104    long ru_nivcsw ;   2104    long ru_nivcsw ;
2105 };   2105 };
2106 struct vki_rlimit {   2106 struct vki_rlimit {
2107    unsigned long rlim_cur ;   2107    unsigned long rlim_cur ;
2108    unsigned long rlim_max ;   2108    unsigned long rlim_max ;
2109 };   2109 };
2110 struct vki_elf_siginfo {   2110 struct vki_elf_siginfo {
2111    int si_signo ;   2111    int si_signo ;
2112    int si_code ;   2112    int si_code ;
2113    int si_errno ;   2113    int si_errno ;
2114 };   2114 };
2115 struct vki_elf_prstatus {   2115 struct vki_elf_prstatus {
2116    struct vki_elf_siginfo pr_info ;   2116    struct vki_elf_siginfo pr_info ;
2117    short pr_cursig ;   2117    short pr_cursig ;
2118    unsigned long pr_sigpend ;   2118    unsigned long pr_sigpend ;
2119    unsigned long pr_sighold ;   2119    unsigned long pr_sighold ;
2120    vki_pid_t pr_pid ;   2120    vki_pid_t pr_pid ;
2121    vki_pid_t pr_ppid ;   2121    vki_pid_t pr_ppid ;
2122    vki_pid_t pr_pgrp ;   2122    vki_pid_t pr_pgrp ;
2123    vki_pid_t pr_sid ;   2123    vki_pid_t pr_sid ;
2124    struct vki_timeval pr_utime ;   2124    struct vki_timeval pr_utime ;
2125    struct vki_timeval pr_stime ;   2125    struct vki_timeval pr_stime ;
2126    struct vki_timeval pr_cutime ;   2126    struct vki_timeval pr_cutime ;
2127    struct vki_timeval pr_cstime ;   2127    struct vki_timeval pr_cstime ;
2128    vki_elf_gregset_t pr_reg ;   2128    vki_elf_gregset_t pr_reg ;
2129    int pr_fpvalid ;   2129    int pr_fpvalid ;
2130 };   2130 };
2131 struct vki_elf_prpsinfo {   2131 struct vki_elf_prpsinfo {
2132    char pr_state ;   2132    char pr_state ;
2133    char pr_sname ;   2133    char pr_sname ;
2134    char pr_zomb ;   2134    char pr_zomb ;
2135    char pr_nice ;   2135    char pr_nice ;
2136    unsigned long pr_flag ;   2136    unsigned long pr_flag ;
2137    __vki_kernel_uid_t pr_uid ;   2137    __vki_kernel_uid_t pr_uid ;
2138    __vki_kernel_gid_t pr_gid ;   2138    __vki_kernel_gid_t pr_gid ;
2139    vki_pid_t pr_pid ;   2139    vki_pid_t pr_pid ;
2140    vki_pid_t pr_ppid ;   2140    vki_pid_t pr_ppid ;
2141    vki_pid_t pr_pgrp ;   2141    vki_pid_t pr_pgrp ;
2142    vki_pid_t pr_sid ;   2142    vki_pid_t pr_sid ;
2143    char pr_fname[16] ;   2143    char pr_fname[16] ;
2144    char pr_psargs[80] ;   2144    char pr_psargs[80] ;
2145 };   2145 };
2146 struct vki_epoll_event {   2146 struct vki_epoll_event {
2147    __vki_u32 events ;   2147    __vki_u32 events ;
2148    __vki_u64 data ;   2148    __vki_u64 data ;
2149 };   2149 };
2150 struct vki_mq_attr {   2150 struct vki_mq_attr {
2151    long mq_flags ;   2151    long mq_flags ;
2152    long mq_maxmsg ;   2152    long mq_maxmsg ;
2153    long mq_msgsize ;   2153    long mq_msgsize ;
2154    long mq_curmsgs ;   2154    long mq_curmsgs ;
2155    long __reserved[4] ;   2155    long __reserved[4] ;
2156 };   2156 };
2157 struct vki_new_utsname {   2157 struct vki_new_utsname {
2158    char sysname[65] ;   2158    char sysname[65] ;
2159    char nodename[65] ;   2159    char nodename[65] ;
2160    char release[65] ;   2160    char release[65] ;
2161    char version[65] ;   2161    char version[65] ;
2162    char machine[65] ;   2162    char machine[65] ;
2163    char domainname[65] ;   2163    char domainname[65] ;
2164 };   2164 };
2165 struct vki_mii_ioctl_data {   2165 struct vki_mii_ioctl_data {
2166    vki_u16 phy_id ;   2166    vki_u16 phy_id ;
2167    vki_u16 reg_num ;   2167    vki_u16 reg_num ;
2168    vki_u16 val_in ;   2168    vki_u16 val_in ;
2169    vki_u16 val_out ;   2169    vki_u16 val_out ;
2170 };   2170 };
2171 struct __vki_user_cap_header_struct {   2171 struct __vki_user_cap_header_struct {
2172    __vki_u32 version ;   2172    __vki_u32 version ;
2173    int pid ;   2173    int pid ;
2174 };   2174 };
2175 typedef struct __vki_user_cap_header_struct *vki_cap_user_header_t;   2175 typedef struct __vki_user_cap_header_struct *vki_cap_user_header_t;
2176 struct __vki_user_cap_data_struct {   2176 struct __vki_user_cap_data_struct {
2177    __vki_u32 effective ;   2177    __vki_u32 effective ;
2178    __vki_u32 permitted ;   2178    __vki_u32 permitted ;
2179    __vki_u32 inheritable ;   2179    __vki_u32 inheritable ;
2180 };   2180 };
2181 typedef struct __vki_user_cap_data_struct *vki_cap_user_data_t;   2181 typedef struct __vki_user_cap_data_struct *vki_cap_user_data_t;
2182 struct vki_ipc_perm {   2182 struct vki_ipc_perm {
2183    __vki_kernel_key_t key ;   2183    __vki_kernel_key_t key ;
2184    __vki_kernel_uid_t uid ;   2184    __vki_kernel_uid_t uid ;
2185    __vki_kernel_gid_t gid ;   2185    __vki_kernel_gid_t gid ;
2186    __vki_kernel_uid_t cuid ;   2186    __vki_kernel_uid_t cuid ;
2187    __vki_kernel_gid_t cgid ;   2187    __vki_kernel_gid_t cgid ;
2188    __vki_kernel_mode_t mode ;   2188    __vki_kernel_mode_t mode ;
2189    unsigned short seq ;   2189    unsigned short seq ;
2190 };   2190 };
2191 struct vki_semid_ds {   2191 struct vki_semid_ds {
2192    struct vki_ipc_perm sem_perm ;   2192    struct vki_ipc_perm sem_perm ;
2193    __vki_kernel_time_t sem_otime ;   2193    __vki_kernel_time_t sem_otime ;
2194    __vki_kernel_time_t sem_ctime ;   2194    __vki_kernel_time_t sem_ctime ;
2195    void *sem_base ;   2195    void *sem_base ;
2196    void *sem_pending ;   2196    void *sem_pending ;
2197    void **sem_pending_last ;   2197    void **sem_pending_last ;
2198    void *undo ;   2198    void *undo ;
2199    unsigned short sem_nsems ;   2199    unsigned short sem_nsems ;
2200 };   2200 };
2201 struct vki_sembuf {   2201 struct vki_sembuf {
2202    unsigned short sem_num ;   2202    unsigned short sem_num ;
2203    short sem_op ;   2203    short sem_op ;
2204    short sem_flg ;   2204    short sem_flg ;
2205 };   2205 };
2206 struct vki_seminfo;   2206 struct vki_seminfo;
2207 union vki_semun {   2207 union vki_semun {
2208    int val ;   2208    int val ;
2209    struct vki_semid_ds *buf ;   2209    struct vki_semid_ds *buf ;
2210    unsigned short *array ;   2210    unsigned short *array ;
2211    struct vki_seminfo *__buf ;   2211    struct vki_seminfo *__buf ;
2212    void *__pad ;   2212    void *__pad ;
2213 };   2213 };
2214 struct vki_seminfo {   2214 struct vki_seminfo {
2215    int semmap ;   2215    int semmap ;
2216    int semmni ;   2216    int semmni ;
2217    int semmns ;   2217    int semmns ;
2218    int semmnu ;   2218    int semmnu ;
2219    int semmsl ;   2219    int semmsl ;
2220    int semopm ;   2220    int semopm ;
2221    int semume ;   2221    int semume ;
2222    int semusz ;   2222    int semusz ;
2223    int semvmx ;   2223    int semvmx ;
2224    int semaem ;   2224    int semaem ;
2225 };   2225 };
2226 struct vki_robust_list {   2226 struct vki_robust_list {
2227    struct vki_robust_list *next ;   2227    struct vki_robust_list *next ;
2228 };   2228 };
2229 struct vki_robust_list_head {   2229 struct vki_robust_list_head {
2230    struct vki_robust_list list ;   2230    struct vki_robust_list list ;
2231    long futex_offset ;   2231    long futex_offset ;
2232    struct vki_robust_list *list_op_pending ;   2232    struct vki_robust_list *list_op_pending ;
2233 };   2233 };
2234 struct vki_dirent {   2234 struct vki_dirent {
2235    long d_ino ;   2235    long d_ino ;
2236    __vki_kernel_off_t d_off ;   2236    __vki_kernel_off_t d_off ;
2237    unsigned short d_reclen ;   2237    unsigned short d_reclen ;
2238    char d_name[256] ;   2238    char d_name[256] ;
2239 };   2239 };
2240 struct __vki_sysctl_args {   2240 struct __vki_sysctl_args {
2241    int *name ;   2241    int *name ;
2242    int nlen ;   2242    int nlen ;
2243    void *oldval ;   2243    void *oldval ;
2244    vki_size_t *oldlenp ;   2244    vki_size_t *oldlenp ;
2245    void *newval ;   2245    void *newval ;
2246    vki_size_t newlen ;   2246    vki_size_t newlen ;
2247    unsigned long __unused[4] ;   2247    unsigned long __unused[4] ;
2248 };   2248 };
2249 typedef unsigned long vki_aio_context_t;   2249 typedef unsigned long vki_aio_context_t;
2250 enum __anonenum_89 {   2250 enum __anonenum_89 {
2251     VKI_IOCB_CMD_PREAD = 0,   2251     VKI_IOCB_CMD_PREAD = 0,
2252     VKI_IOCB_CMD_PWRITE = 1,   2252     VKI_IOCB_CMD_PWRITE = 1,
2253     VKI_IOCB_CMD_FSYNC = 2,   2253     VKI_IOCB_CMD_FSYNC = 2,
2254     VKI_IOCB_CMD_FDSYNC = 3,   2254     VKI_IOCB_CMD_FDSYNC = 3,
2255     VKI_IOCB_CMD_PREADV = 7,   2255     VKI_IOCB_CMD_PREADV = 7,
2256     VKI_IOCB_CMD_PWRITEV = 8   2256     VKI_IOCB_CMD_PWRITEV = 8
2257 } ;   2257 } ;
2258 struct vki_io_event {   2258 struct vki_io_event {
2259    __vki_u64 data ;   2259    __vki_u64 data ;
2260    __vki_u64 obj ;   2260    __vki_u64 obj ;
2261    __vki_s64 result ;   2261    __vki_s64 result ;
2262    __vki_s64 result2 ;   2262    __vki_s64 result2 ;
2263 };   2263 };
2264 struct vki_iocb {   2264 struct vki_iocb {
2265    __vki_u64 aio_data ;   2265    __vki_u64 aio_data ;
2266    __vki_u32 aio_key ;   2266    __vki_u32 aio_key ;
2267    __vki_u32 aio_reserved1 ;   2267    __vki_u32 aio_reserved1 ;
2268    __vki_u16 aio_lio_opcode ;   2268    __vki_u16 aio_lio_opcode ;
2269    __vki_s16 aio_reqprio ;   2269    __vki_s16 aio_reqprio ;
2270    __vki_u32 aio_fildes ;   2270    __vki_u32 aio_fildes ;
2271    __vki_u64 aio_buf ;   2271    __vki_u64 aio_buf ;
2272    __vki_u64 aio_nbytes ;   2272    __vki_u64 aio_nbytes ;
2273    __vki_s64 aio_offset ;   2273    __vki_s64 aio_offset ;
2274    __vki_u64 aio_reserved2 ;   2274    __vki_u64 aio_reserved2 ;
2275    __vki_u64 aio_reserved3 ;   2275    __vki_u64 aio_reserved3 ;
2276 };   2276 };
2277 struct vki_aio_ring {   2277 struct vki_aio_ring {
2278    unsigned int id ;   2278    unsigned int id ;
2279    unsigned int nr ;   2279    unsigned int nr ;
2280    unsigned int head ;   2280    unsigned int head ;
2281    unsigned int tail ;   2281    unsigned int tail ;
2282    unsigned int magic ;   2282    unsigned int magic ;
2283    unsigned int compat_features ;   2283    unsigned int compat_features ;
2284    unsigned int incompat_features ;   2284    unsigned int incompat_features ;
2285    unsigned int header_length ;   2285    unsigned int header_length ;
2286    struct vki_io_event io_events[0] ;   2286    struct vki_io_event io_events[0] ;
2287 };   2287 };
2288 struct vki_msg;   2288 struct vki_msg;
2289 struct vki_msqid_ds {   2289 struct vki_msqid_ds {
2290    struct vki_ipc_perm msg_perm ;   2290    struct vki_ipc_perm msg_perm ;
2291    struct vki_msg *msg_first ;   2291    struct vki_msg *msg_first ;
2292    struct vki_msg *msg_last ;   2292    struct vki_msg *msg_last ;
2293    __vki_kernel_time_t msg_stime ;   2293    __vki_kernel_time_t msg_stime ;
2294    __vki_kernel_time_t msg_rtime ;   2294    __vki_kernel_time_t msg_rtime ;
2295    __vki_kernel_time_t msg_ctime ;   2295    __vki_kernel_time_t msg_ctime ;
2296    unsigned long msg_lcbytes ;   2296    unsigned long msg_lcbytes ;
2297    unsigned long msg_lqbytes ;   2297    unsigned long msg_lqbytes ;
2298    unsigned short msg_cbytes ;   2298    unsigned short msg_cbytes ;
2299    unsigned short msg_qnum ;   2299    unsigned short msg_qnum ;
2300    unsigned short msg_qbytes ;   2300    unsigned short msg_qbytes ;
2301    __vki_kernel_ipc_pid_t msg_lspid ;   2301    __vki_kernel_ipc_pid_t msg_lspid ;
2302    __vki_kernel_ipc_pid_t msg_lrpid ;   2302    __vki_kernel_ipc_pid_t msg_lrpid ;
2303 };   2303 };
2304 struct vki_msgbuf {   2304 struct vki_msgbuf {
2305    long mtype ;   2305    long mtype ;
2306    char mtext[1] ;   2306    char mtext[1] ;
2307 };   2307 };
2308 struct vki_msginfo {   2308 struct vki_msginfo {
2309    int msgpool ;   2309    int msgpool ;
2310    int msgmap ;   2310    int msgmap ;
2311    int msgmax ;   2311    int msgmax ;
2312    int msgmnb ;   2312    int msgmnb ;
2313    int msgmni ;   2313    int msgmni ;
2314    int msgssz ;   2314    int msgssz ;
2315    int msgtql ;   2315    int msgtql ;
2316    unsigned short msgseg ;   2316    unsigned short msgseg ;
2317 };   2317 };
2318 struct vki_shmid_ds {   2318 struct vki_shmid_ds {
2319    struct vki_ipc_perm shm_perm ;   2319    struct vki_ipc_perm shm_perm ;
2320    int shm_segsz ;   2320    int shm_segsz ;
2321    __vki_kernel_time_t shm_atime ;   2321    __vki_kernel_time_t shm_atime ;
2322    __vki_kernel_time_t shm_dtime ;   2322    __vki_kernel_time_t shm_dtime ;
2323    __vki_kernel_time_t shm_ctime ;   2323    __vki_kernel_time_t shm_ctime ;
2324    __vki_kernel_ipc_pid_t shm_cpid ;   2324    __vki_kernel_ipc_pid_t shm_cpid ;
2325    __vki_kernel_ipc_pid_t shm_lpid ;   2325    __vki_kernel_ipc_pid_t shm_lpid ;
2326    unsigned short shm_nattch ;   2326    unsigned short shm_nattch ;
2327    unsigned short shm_unused ;   2327    unsigned short shm_unused ;
2328    void *shm_unused2 ;   2328    void *shm_unused2 ;
2329    void *shm_unused3 ;   2329    void *shm_unused3 ;
2330 };   2330 };
2331 struct vki_shminfo {   2331 struct vki_shminfo {
2332    int shmmax ;   2332    int shmmax ;
2333    int shmmin ;   2333    int shmmin ;
2334    int shmmni ;   2334    int shmmni ;
2335    int shmseg ;   2335    int shmseg ;
2336    int shmall ;   2336    int shmall ;
2337 };   2337 };
2338 struct vki_shm_info {   2338 struct vki_shm_info {
2339    int used_ids ;   2339    int used_ids ;
2340    unsigned long shm_tot ;   2340    unsigned long shm_tot ;
2341    unsigned long shm_rss ;   2341    unsigned long shm_rss ;
2342    unsigned long shm_swp ;   2342    unsigned long shm_swp ;
2343    unsigned long swap_attempts ;   2343    unsigned long swap_attempts ;
2344    unsigned long swap_successes ;   2344    unsigned long swap_successes ;
2345 };   2345 };
2346 struct vki_rtc_time {   2346 struct vki_rtc_time {
2347    int tm_sec ;   2347    int tm_sec ;
2348    int tm_min ;   2348    int tm_min ;
2349    int tm_hour ;   2349    int tm_hour ;
2350    int tm_mday ;   2350    int tm_mday ;
2351    int tm_mon ;   2351    int tm_mon ;
2352    int tm_year ;   2352    int tm_year ;
2353    int tm_wday ;   2353    int tm_wday ;
2354    int tm_yday ;   2354    int tm_yday ;
2355    int tm_isdst ;   2355    int tm_isdst ;
2356 };   2356 };
2357 struct __anonstruct_vki_isdn_net_ioctl_phone_90 {   2357 struct __anonstruct_vki_isdn_net_ioctl_phone_90 {
2358    char name[10] ;   2358    char name[10] ;
2359    char phone[32] ;   2359    char phone[32] ;
2360    int outgoing ;   2360    int outgoing ;
2361 };   2361 };
2362 typedef struct __anonstruct_vki_isdn_net_ioctl_phone_90 vki_isdn_net_ioctl_phone;   2362 typedef struct __anonstruct_vki_isdn_net_ioctl_phone_90 vki_isdn_net_ioctl_phone;
2363 struct vki_ppdev_frob_struct {   2363 struct vki_ppdev_frob_struct {
2364    unsigned char mask ;   2364    unsigned char mask ;
2365    unsigned char val ;   2365    unsigned char val ;
2366 };   2366 };
2367 struct vki_sg_io_hdr {   2367 struct vki_sg_io_hdr {
2368    int interface_id ;   2368    int interface_id ;
2369    int dxfer_direction ;   2369    int dxfer_direction ;
2370    unsigned char cmd_len ;   2370    unsigned char cmd_len ;
2371    unsigned char mx_sb_len ;   2371    unsigned char mx_sb_len ;
2372    unsigned short iovec_count ;   2372    unsigned short iovec_count ;
2373    unsigned int dxfer_len ;   2373    unsigned int dxfer_len ;
2374    void *dxferp ;   2374    void *dxferp ;
2375    unsigned char *cmdp ;   2375    unsigned char *cmdp ;
2376    void *sbp ;   2376    void *sbp ;
2377    unsigned int timeout ;   2377    unsigned int timeout ;
2378    unsigned int flags ;   2378    unsigned int flags ;
2379    int pack_id ;   2379    int pack_id ;
2380    void *usr_ptr ;   2380    void *usr_ptr ;
2381    unsigned char status ;   2381    unsigned char status ;
2382    unsigned char masked_status ;   2382    unsigned char masked_status ;
2383    unsigned char msg_status ;   2383    unsigned char msg_status ;
2384    unsigned char sb_len_wr ;   2384    unsigned char sb_len_wr ;
2385    unsigned short host_status ;   2385    unsigned short host_status ;
2386    unsigned short driver_status ;   2386    unsigned short driver_status ;
2387    int resid ;   2387    int resid ;
2388    unsigned int duration ;   2388    unsigned int duration ;
2389    unsigned int info ;   2389    unsigned int info ;
2390 };   2390 };
2391 typedef struct vki_sg_io_hdr vki_sg_io_hdr_t;   2391 typedef struct vki_sg_io_hdr vki_sg_io_hdr_t;
2392 struct vki_sg_scsi_id {   2392 struct vki_sg_scsi_id {
2393    int host_no ;   2393    int host_no ;
2394    int channel ;   2394    int channel ;
2395    int scsi_id ;   2395    int scsi_id ;
2396    int lun ;   2396    int lun ;
2397    int scsi_type ;   2397    int scsi_type ;
2398    short h_cmd_per_lun ;   2398    short h_cmd_per_lun ;
2399    short d_queue_depth ;   2399    short d_queue_depth ;
2400    int unused[2] ;   2400    int unused[2] ;
2401 };   2401 };
2402 typedef struct vki_sg_scsi_id vki_sg_scsi_id_t;   2402 typedef struct vki_sg_scsi_id vki_sg_scsi_id_t;
2403 struct vki_cdrom_msf0 {   2403 struct vki_cdrom_msf0 {
2404    __vki_u8 minute ;   2404    __vki_u8 minute ;
2405    __vki_u8 second ;   2405    __vki_u8 second ;
2406    __vki_u8 frame ;   2406    __vki_u8 frame ;
2407 };   2407 };
2408 union vki_cdrom_addr {   2408 union vki_cdrom_addr {
2409    struct vki_cdrom_msf0 msf ;   2409    struct vki_cdrom_msf0 msf ;
2410    int lba ;   2410    int lba ;
2411 };   2411 };
2412 struct vki_cdrom_msf {   2412 struct vki_cdrom_msf {
2413    __vki_u8 cdmsf_min0 ;   2413    __vki_u8 cdmsf_min0 ;
2414    __vki_u8 cdmsf_sec0 ;   2414    __vki_u8 cdmsf_sec0 ;
2415    __vki_u8 cdmsf_frame0 ;   2415    __vki_u8 cdmsf_frame0 ;
2416    __vki_u8 cdmsf_min1 ;   2416    __vki_u8 cdmsf_min1 ;
2417    __vki_u8 cdmsf_sec1 ;   2417    __vki_u8 cdmsf_sec1 ;
2418    __vki_u8 cdmsf_frame1 ;   2418    __vki_u8 cdmsf_frame1 ;
2419 };   2419 };
2420 struct vki_cdrom_tochdr {   2420 struct vki_cdrom_tochdr {
2421    __vki_u8 cdth_trk0 ;   2421    __vki_u8 cdth_trk0 ;
2422    __vki_u8 cdth_trk1 ;   2422    __vki_u8 cdth_trk1 ;
2423 };   2423 };
2424 struct vki_cdrom_volctrl {   2424 struct vki_cdrom_volctrl {
2425    __vki_u8 channel0 ;   2425    __vki_u8 channel0 ;
2426    __vki_u8 channel1 ;   2426    __vki_u8 channel1 ;
2427    __vki_u8 channel2 ;   2427    __vki_u8 channel2 ;
2428    __vki_u8 channel3 ;   2428    __vki_u8 channel3 ;
2429 };   2429 };
2430 struct vki_cdrom_subchnl {   2430 struct vki_cdrom_subchnl {
2431    __vki_u8 cdsc_format ;   2431    __vki_u8 cdsc_format ;
2432    __vki_u8 cdsc_audiostatus ;   2432    __vki_u8 cdsc_audiostatus ;
2433    __vki_u8 cdsc_adr : 4 ;   2433    __vki_u8 cdsc_adr : 4 ;
2434    __vki_u8 cdsc_ctrl : 4 ;   2434    __vki_u8 cdsc_ctrl : 4 ;
2435    __vki_u8 cdsc_trk ;   2435    __vki_u8 cdsc_trk ;
2436    __vki_u8 cdsc_ind ;   2436    __vki_u8 cdsc_ind ;
2437    union vki_cdrom_addr cdsc_absaddr ;   2437    union vki_cdrom_addr cdsc_absaddr ;
2438    union vki_cdrom_addr cdsc_reladdr ;   2438    union vki_cdrom_addr cdsc_reladdr ;
2439 };   2439 };
2440 struct vki_cdrom_tocentry {   2440 struct vki_cdrom_tocentry {
2441    __vki_u8 cdte_track ;   2441    __vki_u8 cdte_track ;
2442    __vki_u8 cdte_adr : 4 ;   2442    __vki_u8 cdte_adr : 4 ;
2443    __vki_u8 cdte_ctrl : 4 ;   2443    __vki_u8 cdte_ctrl : 4 ;
2444    __vki_u8 cdte_format ;   2444    __vki_u8 cdte_format ;
2445    union vki_cdrom_addr cdte_addr ;   2445    union vki_cdrom_addr cdte_addr ;
2446    __vki_u8 cdte_datamode ;   2446    __vki_u8 cdte_datamode ;
2447 };   2447 };
2448 struct vki_cdrom_read {   2448 struct vki_cdrom_read {
2449    int cdread_lba ;   2449    int cdread_lba ;
2450    char *cdread_bufaddr ;   2450    char *cdread_bufaddr ;
2451    int cdread_buflen ;   2451    int cdread_buflen ;
2452 };   2452 };
2453 struct vki_cdrom_read_audio {   2453 struct vki_cdrom_read_audio {
2454    union vki_cdrom_addr addr ;   2454    union vki_cdrom_addr addr ;
2455    __vki_u8 addr_format ;   2455    __vki_u8 addr_format ;
2456    int nframes ;   2456    int nframes ;
2457    __vki_u8 *buf ;   2457    __vki_u8 *buf ;
2458 };   2458 };
2459 struct vki_cdrom_multisession {   2459 struct vki_cdrom_multisession {
2460    union vki_cdrom_addr addr ;   2460    union vki_cdrom_addr addr ;
2461    __vki_u8 xa_flag ;   2461    __vki_u8 xa_flag ;
2462    __vki_u8 addr_format ;   2462    __vki_u8 addr_format ;
2463 };   2463 };
2464 struct vki_cdrom_mcn {   2464 struct vki_cdrom_mcn {
2465    __vki_u8 medium_catalog_number[14] ;   2465    __vki_u8 medium_catalog_number[14] ;
2466 };   2466 };
2467 struct vki_cdrom_generic_command {   2467 struct vki_cdrom_generic_command {
2468    unsigned char cmd[12] ;   2468    unsigned char cmd[12] ;
2469    unsigned char *buffer ;   2469    unsigned char *buffer ;
2470    unsigned int buflen ;   2470    unsigned int buflen ;
2471    int stat ;   2471    int stat ;
2472    void *sense ;   2472    void *sense ;
2473    unsigned char data_direction ;   2473    unsigned char data_direction ;
2474    int quiet ;   2474    int quiet ;
2475    int timeout ;   2475    int timeout ;
2476    void *reserved[1] ;   2476    void *reserved[1] ;
2477 };   2477 };
2478 struct vki_audio_buf_info {   2478 struct vki_audio_buf_info {
2479    int fragments ;   2479    int fragments ;
2480    int fragstotal ;   2480    int fragstotal ;
2481    int fragsize ;   2481    int fragsize ;
2482    int bytes ;   2482    int bytes ;
2483 };   2483 };
2484 typedef struct vki_audio_buf_info vki_audio_buf_info;   2484 typedef struct vki_audio_buf_info vki_audio_buf_info;
2485 struct vki_hd_geometry {   2485 struct vki_hd_geometry {
2486    unsigned char heads ;   2486    unsigned char heads ;
2487    unsigned char sectors ;   2487    unsigned char sectors ;
2488    unsigned short cylinders ;   2488    unsigned short cylinders ;
2489    unsigned long start ;   2489    unsigned long start ;
2490 };   2490 };
2491 struct vki_fb_fix_screeninfo {   2491 struct vki_fb_fix_screeninfo {
2492    char id[16] ;   2492    char id[16] ;
2493    unsigned long smem_start ;   2493    unsigned long smem_start ;
2494    __vki_u32 smem_len ;   2494    __vki_u32 smem_len ;
2495    __vki_u32 type ;   2495    __vki_u32 type ;
2496    __vki_u32 type_aux ;   2496    __vki_u32 type_aux ;
2497    __vki_u32 visual ;   2497    __vki_u32 visual ;
2498    __vki_u16 xpanstep ;   2498    __vki_u16 xpanstep ;
2499    __vki_u16 ypanstep ;   2499    __vki_u16 ypanstep ;
2500    __vki_u16 ywrapstep ;   2500    __vki_u16 ywrapstep ;
2501    __vki_u32 line_length ;   2501    __vki_u32 line_length ;
2502    unsigned long mmio_start ;   2502    unsigned long mmio_start ;
2503    __vki_u32 mmio_len ;   2503    __vki_u32 mmio_len ;
2504    __vki_u32 accel ;   2504    __vki_u32 accel ;
2505    __vki_u16 reserved[3] ;   2505    __vki_u16 reserved[3] ;
2506 };   2506 };
2507 struct vki_fb_bitfield {   2507 struct vki_fb_bitfield {
2508    __vki_u32 offset ;   2508    __vki_u32 offset ;
2509    __vki_u32 length ;   2509    __vki_u32 length ;
2510    __vki_u32 msb_right ;   2510    __vki_u32 msb_right ;
2511 };   2511 };
2512 struct vki_fb_var_screeninfo {   2512 struct vki_fb_var_screeninfo {
2513    __vki_u32 xres ;   2513    __vki_u32 xres ;
2514    __vki_u32 yres ;   2514    __vki_u32 yres ;
2515    __vki_u32 xres_virtual ;   2515    __vki_u32 xres_virtual ;
2516    __vki_u32 yres_virtual ;   2516    __vki_u32 yres_virtual ;
2517    __vki_u32 xoffset ;   2517    __vki_u32 xoffset ;
2518    __vki_u32 yoffset ;   2518    __vki_u32 yoffset ;
2519    __vki_u32 bits_per_pixel ;   2519    __vki_u32 bits_per_pixel ;
2520    __vki_u32 grayscale ;   2520    __vki_u32 grayscale ;
2521    struct vki_fb_bitfield red ;   2521    struct vki_fb_bitfield red ;
2522    struct vki_fb_bitfield green ;   2522    struct vki_fb_bitfield green ;
2523    struct vki_fb_bitfield blue ;   2523    struct vki_fb_bitfield blue ;
2524    struct vki_fb_bitfield transp ;   2524    struct vki_fb_bitfield transp ;
2525    __vki_u32 nonstd ;   2525    __vki_u32 nonstd ;
2526    __vki_u32 activate ;   2526    __vki_u32 activate ;
2527    __vki_u32 height ;   2527    __vki_u32 height ;
2528    __vki_u32 width ;   2528    __vki_u32 width ;
2529    __vki_u32 accel_flags ;   2529    __vki_u32 accel_flags ;
2530    __vki_u32 pixclock ;   2530    __vki_u32 pixclock ;
2531    __vki_u32 left_margin ;   2531    __vki_u32 left_margin ;
2532    __vki_u32 right_margin ;   2532    __vki_u32 right_margin ;
2533    __vki_u32 upper_margin ;   2533    __vki_u32 upper_margin ;
2534    __vki_u32 lower_margin ;   2534    __vki_u32 lower_margin ;
2535    __vki_u32 hsync_len ;   2535    __vki_u32 hsync_len ;
2536    __vki_u32 vsync_len ;   2536    __vki_u32 vsync_len ;
2537    __vki_u32 sync ;   2537    __vki_u32 sync ;
2538    __vki_u32 vmode ;   2538    __vki_u32 vmode ;
2539    __vki_u32 rotate ;   2539    __vki_u32 rotate ;
2540    __vki_u32 reserved[5] ;   2540    __vki_u32 reserved[5] ;
2541 };   2541 };
2542 struct vki_consolefontdesc {   2542 struct vki_consolefontdesc {
2543    unsigned short charcount ;   2543    unsigned short charcount ;
2544    unsigned short charheight ;   2544    unsigned short charheight ;
2545    char *chardata ;   2545    char *chardata ;
2546 };   2546 };
2547 struct vki_unipair {   2547 struct vki_unipair {
2548    unsigned short unicode ;   2548    unsigned short unicode ;
2549    unsigned short fontpos ;   2549    unsigned short fontpos ;
2550 };   2550 };
2551 struct vki_unimapdesc {   2551 struct vki_unimapdesc {
2552    unsigned short entry_ct ;   2552    unsigned short entry_ct ;
2553    struct vki_unipair *entries ;   2553    struct vki_unipair *entries ;
2554 };   2554 };
2555 struct vki_unimapinit {   2555 struct vki_unimapinit {
2556    unsigned short advised_hashsize ;   2556    unsigned short advised_hashsize ;
2557    unsigned short advised_hashstep ;   2557    unsigned short advised_hashstep ;
2558    unsigned short advised_hashlevel ;   2558    unsigned short advised_hashlevel ;
2559 };   2559 };
2560 struct vki_kbentry {   2560 struct vki_kbentry {
2561    unsigned char kb_table ;   2561    unsigned char kb_table ;
2562    unsigned char kb_index ;   2562    unsigned char kb_index ;
2563    unsigned short kb_value ;   2563    unsigned short kb_value ;
2564 };   2564 };
2565 struct vki_kbsentry {   2565 struct vki_kbsentry {
2566    unsigned char kb_func ;   2566    unsigned char kb_func ;
2567    unsigned char kb_string[512] ;   2567    unsigned char kb_string[512] ;
2568 };   2568 };
2569 struct vki_kbdiacr {   2569 struct vki_kbdiacr {
2570    unsigned char diacr ;   2570    unsigned char diacr ;
2571    unsigned char base ;   2571    unsigned char base ;
2572    unsigned char result ;   2572    unsigned char result ;
2573 };   2573 };
2574 struct vki_kbdiacrs {   2574 struct vki_kbdiacrs {
2575    unsigned int kb_cnt ;   2575    unsigned int kb_cnt ;
2576    struct vki_kbdiacr kbdiacr[256] ;   2576    struct vki_kbdiacr kbdiacr[256] ;
2577 };   2577 };
2578 struct vki_kbkeycode {   2578 struct vki_kbkeycode {
2579    unsigned int scancode ;   2579    unsigned int scancode ;
2580    unsigned int keycode ;   2580    unsigned int keycode ;
2581 };   2581 };
2582 struct vki_kbd_repeat {   2582 struct vki_kbd_repeat {
2583    int delay ;   2583    int delay ;
2584    int period ;   2584    int period ;
2585 };   2585 };
2586 struct vki_console_font_op {   2586 struct vki_console_font_op {
2587    unsigned int op ;   2587    unsigned int op ;
2588    unsigned int flags ;   2588    unsigned int flags ;
2589    unsigned int width ;   2589    unsigned int width ;
2590    unsigned int height ;   2590    unsigned int height ;
2591    unsigned int charcount ;   2591    unsigned int charcount ;
2592    unsigned char *data ;   2592    unsigned char *data ;
2593 };   2593 };
2594 typedef __vki_kernel_uid32_t vki_qid_t;   2594 typedef __vki_kernel_uid32_t vki_qid_t;
2595 struct __anonstruct_92 {   2595 struct __anonstruct_92 {
2596    int  : 0 ;   2596    int  : 0 ;
2597 };   2597 };
2598 struct __anonstruct_93 {   2598 struct __anonstruct_93 {
2599    int  : 0 ;   2599    int  : 0 ;
2600 };   2600 };
2601 enum __anonenum_91 {   2601 enum __anonenum_91 {
2602     VKI_SNDRV_PCM_IOCTL_HW_FREE = 16658,   2602     VKI_SNDRV_PCM_IOCTL_HW_FREE = 16658,
2603     VKI_SNDRV_PCM_IOCTL_HWSYNC = 16674,   2603     VKI_SNDRV_PCM_IOCTL_HWSYNC = 16674,
2604     VKI_SNDRV_PCM_IOCTL_PREPARE = 16704,   2604     VKI_SNDRV_PCM_IOCTL_PREPARE = 16704,
2605     VKI_SNDRV_PCM_IOCTL_RESET = 16705,   2605     VKI_SNDRV_PCM_IOCTL_RESET = 16705,
2606     VKI_SNDRV_PCM_IOCTL_START = 16706,   2606     VKI_SNDRV_PCM_IOCTL_START = 16706,
2607     VKI_SNDRV_PCM_IOCTL_DROP = 16707,   2607     VKI_SNDRV_PCM_IOCTL_DROP = 16707,
2608     VKI_SNDRV_PCM_IOCTL_DRAIN = 16708,   2608     VKI_SNDRV_PCM_IOCTL_DRAIN = 16708,
2609     VKI_SNDRV_PCM_IOCTL_PAUSE = 1074020677,   2609     VKI_SNDRV_PCM_IOCTL_PAUSE = 1074020677,
2610     VKI_SNDRV_PCM_IOCTL_RESUME = 16711,   2610     VKI_SNDRV_PCM_IOCTL_RESUME = 16711,
2611     VKI_SNDRV_PCM_IOCTL_XRUN = 16712,   2611     VKI_SNDRV_PCM_IOCTL_XRUN = 16712,
2612     VKI_SNDRV_PCM_IOCTL_LINK = 1074020704,   2612     VKI_SNDRV_PCM_IOCTL_LINK = 1074020704,
2613     VKI_SNDRV_PCM_IOCTL_UNLINK = 16737   2613     VKI_SNDRV_PCM_IOCTL_UNLINK = 16737
2614 } ;   2614 } ;
2615 enum __anonenum_94 {   2615 enum __anonenum_94 {
2616     VKI_SNDRV_TIMER_IOCTL_START = 21664,   2616     VKI_SNDRV_TIMER_IOCTL_START = 21664,
2617     VKI_SNDRV_TIMER_IOCTL_STOP = 21665,   2617     VKI_SNDRV_TIMER_IOCTL_STOP = 21665,
2618     VKI_SNDRV_TIMER_IOCTL_CONTINUE = 21666,   2618     VKI_SNDRV_TIMER_IOCTL_CONTINUE = 21666,
2619     VKI_SNDRV_TIMER_IOCTL_PAUSE = 21667   2619     VKI_SNDRV_TIMER_IOCTL_PAUSE = 21667
2620 } ;   2620 } ;
2621 struct vki_serial_icounter_struct {   2621 struct vki_serial_icounter_struct {
2622    int cts ;   2622    int cts ;
2623    int dsr ;   2623    int dsr ;
2624    int rng ;   2624    int rng ;
2625    int dcd ;   2625    int dcd ;
2626    int rx ;   2626    int rx ;
2627    int tx ;   2627    int tx ;
2628    int frame ;   2628    int frame ;
2629    int overrun ;   2629    int overrun ;
2630    int parity ;   2630    int parity ;
2631    int brk ;   2631    int brk ;
2632    int buf_overrun ;   2632    int buf_overrun ;
2633    int reserved[9] ;   2633    int reserved[9] ;
2634 };   2634 };
2635 struct vki_vt_mode {   2635 struct vki_vt_mode {
2636    char mode ;   2636    char mode ;
2637    char waitv ;   2637    char waitv ;
2638    short relsig ;   2638    short relsig ;
2639    short acqsig ;   2639    short acqsig ;
2640    short frsig ;   2640    short frsig ;
2641 };   2641 };
2642 struct vki_vt_stat {   2642 struct vki_vt_stat {
2643    unsigned short v_active ;   2643    unsigned short v_active ;
2644    unsigned short v_signal ;   2644    unsigned short v_signal ;
2645    unsigned short v_state ;   2645    unsigned short v_state ;
2646 };   2646 };
2647 struct vki_vt_sizes {   2647 struct vki_vt_sizes {
2648    unsigned short v_rows ;   2648    unsigned short v_rows ;
2649    unsigned short v_cols ;   2649    unsigned short v_cols ;
2650    unsigned short v_scrollsize ;   2650    unsigned short v_scrollsize ;
2651 };   2651 };
2652 struct vki_vt_consize {   2652 struct vki_vt_consize {
2653    unsigned short v_rows ;   2653    unsigned short v_rows ;
2654    unsigned short v_cols ;   2654    unsigned short v_cols ;
2655    unsigned short v_vlin ;   2655    unsigned short v_vlin ;
2656    unsigned short v_clin ;   2656    unsigned short v_clin ;
2657    unsigned short v_vcol ;   2657    unsigned short v_vcol ;
2658    unsigned short v_ccol ;   2658    unsigned short v_ccol ;
2659 };   2659 };
2660 struct vki_usbdevfs_ctrltransfer {   2660 struct vki_usbdevfs_ctrltransfer {
2661    __vki_u8 bRequestType ;   2661    __vki_u8 bRequestType ;
2662    __vki_u8 bRequest ;   2662    __vki_u8 bRequest ;
2663    __vki_u16 wValue ;   2663    __vki_u16 wValue ;
2664    __vki_u16 wIndex ;   2664    __vki_u16 wIndex ;
2665    __vki_u16 wLength ;   2665    __vki_u16 wLength ;
2666    __vki_u32 timeout ;   2666    __vki_u32 timeout ;
2667    void *data ;   2667    void *data ;
2668 };   2668 };
2669 struct vki_usbdevfs_bulktransfer {   2669 struct vki_usbdevfs_bulktransfer {
2670    unsigned int ep ;   2670    unsigned int ep ;
2671    unsigned int len ;   2671    unsigned int len ;
2672    unsigned int timeout ;   2672    unsigned int timeout ;
2673    void *data ;   2673    void *data ;
2674 };   2674 };
2675 struct vki_usbdevfs_getdriver {   2675 struct vki_usbdevfs_getdriver {
2676    unsigned int interface ;   2676    unsigned int interface ;
2677    char driver[256] ;   2677    char driver[256] ;
2678 };   2678 };
2679 struct vki_usbdevfs_connectinfo {   2679 struct vki_usbdevfs_connectinfo {
2680    unsigned int devnum ;   2680    unsigned int devnum ;
2681    unsigned char slow ;   2681    unsigned char slow ;
2682 };   2682 };
2683 struct vki_usbdevfs_iso_packet_desc {   2683 struct vki_usbdevfs_iso_packet_desc {
2684    unsigned int length ;   2684    unsigned int length ;
2685    unsigned int actual_length ;   2685    unsigned int actual_length ;
2686    unsigned int status ;   2686    unsigned int status ;
2687 };   2687 };
2688 struct vki_usbdevfs_urb {   2688 struct vki_usbdevfs_urb {
2689    unsigned char type ;   2689    unsigned char type ;
2690    unsigned char endpoint ;   2690    unsigned char endpoint ;
2691    int status ;   2691    int status ;
2692    unsigned int flags ;   2692    unsigned int flags ;
2693    void *buffer ;   2693    void *buffer ;
2694    int buffer_length ;   2694    int buffer_length ;
2695    int actual_length ;   2695    int actual_length ;
2696    int start_frame ;   2696    int start_frame ;
2697    int number_of_packets ;   2697    int number_of_packets ;
2698    int error_count ;   2698    int error_count ;
2699    unsigned int signr ;   2699    unsigned int signr ;
2700    void *usercontext ;   2700    void *usercontext ;
2701    struct vki_usbdevfs_iso_packet_desc iso_frame_desc[0] ;   2701    struct vki_usbdevfs_iso_packet_desc iso_frame_desc[0] ;
2702 };   2702 };
2703 struct vki_usbdevfs_ioctl {   2703 struct vki_usbdevfs_ioctl {
2704    int ifno ;   2704    int ifno ;
2705    int ioctl_code ;   2705    int ioctl_code ;
2706    void *data ;   2706    void *data ;
2707 };   2707 };
2708 struct vki_usbdevfs_setuppacket {   2708 struct vki_usbdevfs_setuppacket {
2709    __vki_u8 bRequestType ;   2709    __vki_u8 bRequestType ;
2710    __vki_u8 bRequest ;   2710    __vki_u8 bRequest ;
2711    __vki_u16 wValue ;   2711    __vki_u16 wValue ;
2712    __vki_u16 wIndex ;   2712    __vki_u16 wIndex ;
2713    __vki_u16 wLength ;   2713    __vki_u16 wLength ;
2714 };   2714 };
2715 typedef vki_int32_t vki_key_serial_t;   2715 typedef vki_int32_t vki_key_serial_t;
2716 typedef vki_uint32_t vki_key_perm_t;   2716 typedef vki_uint32_t vki_key_perm_t;
2717 struct vki_iw_param {   2717 struct vki_iw_param {
2718    __vki_s32 value ;   2718    __vki_s32 value ;
2719    __vki_u8 fixed ;   2719    __vki_u8 fixed ;
2720    __vki_u8 disabled ;   2720    __vki_u8 disabled ;
2721    __vki_u16 flags ;   2721    __vki_u16 flags ;
2722 };   2722 };
2723 struct vki_iw_point {   2723 struct vki_iw_point {
2724    void *pointer ;   2724    void *pointer ;
2725    __vki_u16 length ;   2725    __vki_u16 length ;
2726    __vki_u16 flags ;   2726    __vki_u16 flags ;
2727 };   2727 };
2728 struct vki_iw_freq {   2728 struct vki_iw_freq {
2729    __vki_s32 m ;   2729    __vki_s32 m ;
2730    __vki_s16 e ;   2730    __vki_s16 e ;
2731    __vki_u8 i ;   2731    __vki_u8 i ;
2732    __vki_u8 flags ;   2732    __vki_u8 flags ;
2733 };   2733 };
2734 struct vki_iw_quality {   2734 struct vki_iw_quality {
2735    __vki_u8 qual ;   2735    __vki_u8 qual ;
2736    __vki_u8 level ;   2736    __vki_u8 level ;
2737    __vki_u8 noise ;   2737    __vki_u8 noise ;
2738    __vki_u8 updated ;   2738    __vki_u8 updated ;
2739 };   2739 };
2740 union vki_iwreq_data {   2740 union vki_iwreq_data {
2741    char name[16] ;   2741    char name[16] ;
2742    struct vki_iw_point essid ;   2742    struct vki_iw_point essid ;
2743    struct vki_iw_param nwid ;   2743    struct vki_iw_param nwid ;
2744    struct vki_iw_freq freq ;   2744    struct vki_iw_freq freq ;
2745    struct vki_iw_param sens ;   2745    struct vki_iw_param sens ;
2746    struct vki_iw_param bitrate ;   2746    struct vki_iw_param bitrate ;
2747    struct vki_iw_param txpower ;   2747    struct vki_iw_param txpower ;
2748    struct vki_iw_param rts ;   2748    struct vki_iw_param rts ;
2749    struct vki_iw_param frag ;   2749    struct vki_iw_param frag ;
2750    __vki_u32 mode ;   2750    __vki_u32 mode ;
2751    struct vki_iw_param retry ;   2751    struct vki_iw_param retry ;
2752    struct vki_iw_point encoding ;   2752    struct vki_iw_point encoding ;
2753    struct vki_iw_param power ;   2753    struct vki_iw_param power ;
2754    struct vki_iw_quality qual ;   2754    struct vki_iw_quality qual ;
2755    struct vki_sockaddr ap_addr ;   2755    struct vki_sockaddr ap_addr ;
2756    struct vki_sockaddr addr ;   2756    struct vki_sockaddr addr ;
2757    struct vki_iw_param param ;   2757    struct vki_iw_param param ;
2758    struct vki_iw_point data ;   2758    struct vki_iw_point data ;
2759 };   2759 };
2760 union __anonunion_ifr_ifrn_95 {   2760 union __anonunion_ifr_ifrn_95 {
2761    char ifrn_name[16] ;   2761    char ifrn_name[16] ;
2762 };   2762 };
2763 struct vki_iwreq {   2763 struct vki_iwreq {
2764    union __anonunion_ifr_ifrn_95 ifr_ifrn ;   2764    union __anonunion_ifr_ifrn_95 ifr_ifrn ;
2765    union vki_iwreq_data u ;   2765    union vki_iwreq_data u ;
2766 };   2766 };
2767 union __anonunion____missing_field_name_96 {   2767 union __anonunion____missing_field_name_96 {
2768    __vki_u64 sample_period ;   2768    __vki_u64 sample_period ;
2769    __vki_u64 sample_freq ;   2769    __vki_u64 sample_freq ;
2770 };   2770 };
2771 struct vki_perf_counter_attr {   2771 struct vki_perf_counter_attr {
2772    __vki_u32 type ;   2772    __vki_u32 type ;
2773    __vki_u32 size ;   2773    __vki_u32 size ;
2774    __vki_u64 config ;   2774    __vki_u64 config ;
2775    union __anonunion____missing_field_name_96 __annonCompField1 ;   2775    union __anonunion____missing_field_name_96 __annonCompField1 ;
2776    __vki_u64 sample_type ;   2776    __vki_u64 sample_type ;
2777    __vki_u64 read_format ;   2777    __vki_u64 read_format ;
2778    __vki_u64 disabled : 1 ;   2778    __vki_u64 disabled : 1 ;
2779    __vki_u64 inherit : 1 ;   2779    __vki_u64 inherit : 1 ;
2780    __vki_u64 pinned : 1 ;   2780    __vki_u64 pinned : 1 ;
2781    __vki_u64 exclusive : 1 ;   2781    __vki_u64 exclusive : 1 ;
2782    __vki_u64 exclude_user : 1 ;   2782    __vki_u64 exclude_user : 1 ;
2783    __vki_u64 exclude_kernel : 1 ;   2783    __vki_u64 exclude_kernel : 1 ;
2784    __vki_u64 exclude_hv : 1 ;   2784    __vki_u64 exclude_hv : 1 ;
2785    __vki_u64 exclude_idle : 1 ;   2785    __vki_u64 exclude_idle : 1 ;
2786    __vki_u64 mmap : 1 ;   2786    __vki_u64 mmap : 1 ;
2787    __vki_u64 comm : 1 ;   2787    __vki_u64 comm : 1 ;
2788    __vki_u64 freq : 1 ;   2788    __vki_u64 freq : 1 ;
2789    __vki_u64 inherit_stat : 1 ;   2789    __vki_u64 inherit_stat : 1 ;
2790    __vki_u64 enable_on_exec : 1 ;   2790    __vki_u64 enable_on_exec : 1 ;
2791    __vki_u64 task : 1 ;   2791    __vki_u64 task : 1 ;
2792    __vki_u64 __reserved_1 : 50 ;   2792    __vki_u64 __reserved_1 : 50 ;
2793    __vki_u32 wakeup_events ;   2793    __vki_u32 wakeup_events ;
2794    __vki_u32 __reserved_2 ;   2794    __vki_u32 __reserved_2 ;
2795    __vki_u64 __reserved_3 ;   2795    __vki_u64 __reserved_3 ;
2796 };   2796 };
2797 struct vki_getcpu_cache {   2797 struct vki_getcpu_cache {
2798    unsigned long blob[128U / sizeof(long )] ;   2798    unsigned long blob[128U / sizeof(long )] ;
2799 };   2799 };
2800 typedef int __jmp_buf[6];   2800 typedef int __jmp_buf[6];
2801 typedef int __sig_atomic_t;   2801 typedef int __sig_atomic_t;
2802 struct __anonstruct___sigset_t_97 {   2802 struct __anonstruct___sigset_t_97 {
2803    unsigned long __val[1024U / (8U * sizeof(unsigned long ))] ;   2803    unsigned long __val[1024U / (8U * sizeof(unsigned long ))] ;
2804 };   2804 };
2805 typedef struct __anonstruct___sigset_t_97 __sigset_t;   2805 typedef struct __anonstruct___sigset_t_97 __sigset_t;
2806 struct __jmp_buf_tag {   2806 struct __jmp_buf_tag {
2807    __jmp_buf __jmpbuf ;   2807    __jmp_buf __jmpbuf ;
2808    int __mask_was_saved ;   2808    int __mask_was_saved ;
2809    __sigset_t __saved_mask ;   2809    __sigset_t __saved_mask ;
2810 };   2810 };
2811 typedef struct __jmp_buf_tag jmp_buf[1];   2811 typedef struct __jmp_buf_tag jmp_buf[1];
2812 typedef struct __jmp_buf_tag sigjmp_buf[1];   2812 typedef struct __jmp_buf_tag sigjmp_buf[1];
2813 enum ThreadStatus {   2813 enum ThreadStatus {
2814     VgTs_Empty = 0,   2814     VgTs_Empty = 0,
2815     VgTs_Init = 1,   2815     VgTs_Init = 1,
2816     VgTs_Runnable = 2,   2816     VgTs_Runnable = 2,
2817     VgTs_WaitSys = 3,   2817     VgTs_WaitSys = 3,
2818     VgTs_Yielding = 4,   2818     VgTs_Yielding = 4,
2819     VgTs_Zombie = 5   2819     VgTs_Zombie = 5
2820 } ;   2820 } ;
2821 typedef enum ThreadStatus ThreadStatus;   2821 typedef enum ThreadStatus ThreadStatus;
2822 enum __anonenum_VgSchedReturnCode_98 {   2822 enum __anonenum_VgSchedReturnCode_98 {
2823     VgSrc_None = 0,   2823     VgSrc_None = 0,
2824     VgSrc_ExitThread = 1,   2824     VgSrc_ExitThread = 1,
2825     VgSrc_ExitProcess = 2,   2825     VgSrc_ExitProcess = 2,
2826     VgSrc_FatalSig = 3   2826     VgSrc_FatalSig = 3
2827 } ;   2827 } ;
2828 typedef enum __anonenum_VgSchedReturnCode_98 VgSchedReturnCode;   2828 typedef enum __anonenum_VgSchedReturnCode_98 VgSchedReturnCode;
2829 typedef VexGuestX86State VexGuestArchState;   2829 typedef VexGuestX86State VexGuestArchState;
2830 struct SyscallStatus;   2830 struct SyscallStatus;
2831 struct SyscallStatus;   2831 struct SyscallStatus;
2832 struct SyscallArgs;   2832 struct SyscallArgs;
2833 struct SyscallArgs;   2833 struct SyscallArgs;
2834 struct __anonstruct_ThreadArchState_99 {   2834 struct __anonstruct_ThreadArchState_99 {
2835    VexGuestArchState vex  __attribute__((__aligned__(16))) ;   2835    VexGuestArchState vex  __attribute__((__aligned__(16))) ;
2836    VexGuestArchState vex_shadow1  __attribute__((__aligned__(16))) ;   2836    VexGuestArchState vex_shadow1  __attribute__((__aligned__(16))) ;
2837    VexGuestArchState vex_shadow2  __attribute__((__aligned__(16))) ;   2837    VexGuestArchState vex_shadow2  __attribute__((__aligned__(16))) ;
2838    UChar vex_spill[4096]  __attribute__((__aligned__(16))) ;   2838    UChar vex_spill[4096]  __attribute__((__aligned__(16))) ;
2839 };   2839 };
2840 typedef struct __anonstruct_ThreadArchState_99 ThreadArchState;   2840 typedef struct __anonstruct_ThreadArchState_99 ThreadArchState;
2841 struct __anonstruct_ThreadOSstate_100 {   2841 struct __anonstruct_ThreadOSstate_100 {
2842    Int lwpid ;   2842    Int lwpid ;
2843    Int threadgroup ;   2843    Int threadgroup ;
2844    ThreadId parent ;   2844    ThreadId parent ;
2845    Addr valgrind_stack_base ;   2845    Addr valgrind_stack_base ;
2846    Addr valgrind_stack_init_SP ;   2846    Addr valgrind_stack_init_SP ;
2847    Word exitcode ;   2847    Word exitcode ;
2848    Int fatalsig ;   2848    Int fatalsig ;
2849 };   2849 };
2850 typedef struct __anonstruct_ThreadOSstate_100 ThreadOSstate;   2850 typedef struct __anonstruct_ThreadOSstate_100 ThreadOSstate;
2851 struct SigQueue;   2851 struct SigQueue;
2852 struct __anonstruct_ThreadState_101 {   2852 struct __anonstruct_ThreadState_101 {
2853    ThreadId tid ;   2853    ThreadId tid ;
2854    ThreadStatus status ;   2854    ThreadStatus status ;
2855    VgSchedReturnCode exitreason ;   2855    VgSchedReturnCode exitreason ;
2856    ThreadArchState arch ;   2856    ThreadArchState arch ;
2857    vki_sigset_t sig_mask ;   2857    vki_sigset_t sig_mask ;
2858    vki_sigset_t tmp_sig_mask ;   2858    vki_sigset_t tmp_sig_mask ;
2859    struct SigQueue *sig_queue ;   2859    struct SigQueue *sig_queue ;
2860    SizeT client_stack_szB ;   2860    SizeT client_stack_szB ;
2861    Addr client_stack_highest_word ;   2861    Addr client_stack_highest_word ;
2862    vki_stack_t altstack ;   2862    vki_stack_t altstack ;
2863    ThreadOSstate os_state ;   2863    ThreadOSstate os_state ;
2864    Bool sched_jmpbuf_valid ;   2864    Bool sched_jmpbuf_valid ;
2865    jmp_buf sched_jmpbuf ;   2865    jmp_buf sched_jmpbuf ;
2866 };   2866 };
2867 typedef struct __anonstruct_ThreadState_101 ThreadState;   2867 typedef struct __anonstruct_ThreadState_101 ThreadState;
2868 enum __anonenum_SegKind_102 {   2868 enum __anonenum_SegKind_102 {
2869     SkFree = 0,   2869     SkFree = 0,
2870     SkAnonC = 1,   2870     SkAnonC = 1,
2871     SkAnonV = 2,   2871     SkAnonV = 2,
2872     SkFileC = 3,   2872     SkFileC = 3,
2873     SkFileV = 4,   2873     SkFileV = 4,
2874     SkShmC = 5,   2874     SkShmC = 5,
2875     SkResvn = 6   2875     SkResvn = 6
2876 } ;   2876 } ;
2877 typedef enum __anonenum_SegKind_102 SegKind;   2877 typedef enum __anonenum_SegKind_102 SegKind;
2878 enum __anonenum_ShrinkMode_103 {   2878 enum __anonenum_ShrinkMode_103 {
2879     SmLower = 0,   2879     SmLower = 0,
2880     SmFixed = 1,   2880     SmFixed = 1,
2881     SmUpper = 2   2881     SmUpper = 2
2882 } ;   2882 } ;
2883 typedef enum __anonenum_ShrinkMode_103 ShrinkMode;   2883 typedef enum __anonenum_ShrinkMode_103 ShrinkMode;
2884 struct __anonstruct_NSegment_104 {   2884 struct __anonstruct_NSegment_104 {
2885    SegKind kind ;   2885    SegKind kind ;
2886    Addr start ;   2886    Addr start ;
2887    Addr end ;   2887    Addr end ;
2888    ShrinkMode smode ;   2888    ShrinkMode smode ;
2889    ULong dev ;   2889    ULong dev ;
2890    ULong ino ;   2890    ULong ino ;
2891    Off64T offset ;   2891    Off64T offset ;
2892    UInt mode ;   2892    UInt mode ;
2893    Int fnIdx ;   2893    Int fnIdx ;
2894    Bool hasR ;   2894    Bool hasR ;
2895    Bool hasW ;   2895    Bool hasW ;
2896    Bool hasX ;   2896    Bool hasX ;
2897    Bool hasT ;   2897    Bool hasT ;
2898    Bool isCH ;   2898    Bool isCH ;
2899    Bool mark ;   2899    Bool mark ;
2900 };   2900 };
2901 typedef struct __anonstruct_NSegment_104 NSegment;   2901 typedef struct __anonstruct_NSegment_104 NSegment;
2902 enum __anonenum_rkind_106 {   2902 enum __anonenum_rkind_106 {
2903     MFixed = 0,   2903     MFixed = 0,
2904     MHint = 1,   2904     MHint = 1,
2905     MAny = 2   2905     MAny = 2
2906 } ;   2906 } ;
2907 struct __anonstruct_MapRequest_105 {   2907 struct __anonstruct_MapRequest_105 {
2908    enum __anonenum_rkind_106 rkind ;   2908    enum __anonenum_rkind_106 rkind ;
2909    Addr start ;   2909    Addr start ;
2910    Addr len ;   2910    Addr len ;
2911 };   2911 };
2912 typedef struct __anonstruct_MapRequest_105 MapRequest;   2912 typedef struct __anonstruct_MapRequest_105 MapRequest;
2913 struct __anonstruct_AixCodeSegChange_107 {   2913 struct __anonstruct_AixCodeSegChange_107 {
2914    Addr code_start ;   2914    Addr code_start ;
2915    Word code_len ;   2915    Word code_len ;
2916    Addr data_start ;   2916    Addr data_start ;
2917    Word data_len ;   2917    Word data_len ;
2918    UChar *file_name ;   2918    UChar *file_name ;
2919    UChar *mem_name ;   2919    UChar *mem_name ;
2920    Bool is_mainexe ;   2920    Bool is_mainexe ;
2921    Bool acquire ;   2921    Bool acquire ;
2922 };   2922 };
2923 typedef struct __anonstruct_AixCodeSegChange_107 AixCodeSegChange;   2923 typedef struct __anonstruct_AixCodeSegChange_107 AixCodeSegChange;
2924 struct __anonstruct_VgStack_108 {   2924 struct __anonstruct_VgStack_108 {
2925    HChar bytes[1064960] ;   2925    HChar bytes[1064960] ;
2926 };   2926 };
2927 typedef struct __anonstruct_VgStack_108 VgStack;   2927 typedef struct __anonstruct_VgStack_108 VgStack;
2928 struct __anonstruct_OrigFn_109 {   2928 struct __anonstruct_OrigFn_109 {
2929    unsigned int nraddr ;   2929    unsigned int nraddr ;
2930 };   2930 };
2931 typedef struct __anonstruct_OrigFn_109 OrigFn;   2931 typedef struct __anonstruct_OrigFn_109 OrigFn;
2932 enum __anonenum_Vg_ClientRequest_110 {   2932 enum __anonenum_Vg_ClientRequest_110 {
2933     VG_USERREQ__RUNNING_ON_VALGRIND = 4097,   2933     VG_USERREQ__RUNNING_ON_VALGRIND = 4097,
2934     VG_USERREQ__DISCARD_TRANSLATIONS = 4098,   2934     VG_USERREQ__DISCARD_TRANSLATIONS = 4098,
2935     VG_USERREQ__CLIENT_CALL0 = 4353,   2935     VG_USERREQ__CLIENT_CALL0 = 4353,
2936     VG_USERREQ__CLIENT_CALL1 = 4354,   2936     VG_USERREQ__CLIENT_CALL1 = 4354,
2937     VG_USERREQ__CLIENT_CALL2 = 4355,   2937     VG_USERREQ__CLIENT_CALL2 = 4355,
2938     VG_USERREQ__CLIENT_CALL3 = 4356,   2938     VG_USERREQ__CLIENT_CALL3 = 4356,
2939     VG_USERREQ__COUNT_ERRORS = 4609,   2939     VG_USERREQ__COUNT_ERRORS = 4609,
2940     VG_USERREQ__GDB_MONITOR_COMMAND = 4610,   2940     VG_USERREQ__GDB_MONITOR_COMMAND = 4610,
2941     VG_USERREQ__MALLOCLIKE_BLOCK = 4865,   2941     VG_USERREQ__MALLOCLIKE_BLOCK = 4865,
2942     VG_USERREQ__RESIZEINPLACE_BLOCK = 4875,   2942     VG_USERREQ__RESIZEINPLACE_BLOCK = 4875,
2943     VG_USERREQ__FREELIKE_BLOCK = 4866,   2943     VG_USERREQ__FREELIKE_BLOCK = 4866,
2944     VG_USERREQ__CREATE_MEMPOOL = 4867,   2944     VG_USERREQ__CREATE_MEMPOOL = 4867,
2945     VG_USERREQ__DESTROY_MEMPOOL = 4868,   2945     VG_USERREQ__DESTROY_MEMPOOL = 4868,
2946     VG_USERREQ__MEMPOOL_ALLOC = 4869,   2946     VG_USERREQ__MEMPOOL_ALLOC = 4869,
2947     VG_USERREQ__MEMPOOL_FREE = 4870,   2947     VG_USERREQ__MEMPOOL_FREE = 4870,
2948     VG_USERREQ__MEMPOOL_TRIM = 4871,   2948     VG_USERREQ__MEMPOOL_TRIM = 4871,
2949     VG_USERREQ__MOVE_MEMPOOL = 4872,   2949     VG_USERREQ__MOVE_MEMPOOL = 4872,
2950     VG_USERREQ__MEMPOOL_CHANGE = 4873,   2950     VG_USERREQ__MEMPOOL_CHANGE = 4873,
2951     VG_USERREQ__MEMPOOL_EXISTS = 4874,   2951     VG_USERREQ__MEMPOOL_EXISTS = 4874,
2952     VG_USERREQ__PRINTF = 5121,   2952     VG_USERREQ__PRINTF = 5121,
2953     VG_USERREQ__PRINTF_BACKTRACE = 5122,   2953     VG_USERREQ__PRINTF_BACKTRACE = 5122,
2954     VG_USERREQ__PRINTF_VALIST_BY_REF = 5123,   2954     VG_USERREQ__PRINTF_VALIST_BY_REF = 5123,
2955     VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF = 5124,   2955     VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF = 5124,
2956     VG_USERREQ__STACK_REGISTER = 5377,   2956     VG_USERREQ__STACK_REGISTER = 5377,
2957     VG_USERREQ__STACK_DEREGISTER = 5378,   2957     VG_USERREQ__STACK_DEREGISTER = 5378,
2958     VG_USERREQ__STACK_CHANGE = 5379,   2958     VG_USERREQ__STACK_CHANGE = 5379,
2959     VG_USERREQ__LOAD_PDB_DEBUGINFO = 5633,   2959     VG_USERREQ__LOAD_PDB_DEBUGINFO = 5633,
2960     VG_USERREQ__MAP_IP_TO_SRCLOC = 5889   2960     VG_USERREQ__MAP_IP_TO_SRCLOC = 5889
2961 } ;   2961 } ;
2962 typedef enum __anonenum_Vg_ClientRequest_110 Vg_ClientRequest;   2962 typedef enum __anonenum_Vg_ClientRequest_110 Vg_ClientRequest;
2963 enum __anonenum_Vg_InternalClientRequest_111 {   2963 enum __anonenum_Vg_InternalClientRequest_111 {
2964     VG_USERREQ__LIBC_FREERES_DONE = 12329,   2964     VG_USERREQ__LIBC_FREERES_DONE = 12329,
2965     VG_USERREQ__GET_MALLOCFUNCS = 12336,   2965     VG_USERREQ__GET_MALLOCFUNCS = 12336,
2966     VG_USERREQ__INTERNAL_PRINTF_VALIST_BY_REF = 12547,   2966     VG_USERREQ__INTERNAL_PRINTF_VALIST_BY_REF = 12547,
2967     VG_USERREQ__ADD_IFUNC_TARGET = 12548   2967     VG_USERREQ__ADD_IFUNC_TARGET = 12548
2968 } ;   2968 } ;
2969 typedef enum __anonenum_Vg_InternalClientRequest_111 Vg_InternalClientRequest;   2969 typedef enum __anonenum_Vg_InternalClientRequest_111 Vg_InternalClientRequest;
2970 struct _ExeContext;   2970 struct _ExeContext;
2971 typedef struct _ExeContext ExeContext;   2971 typedef struct _ExeContext ExeContext;
2972 enum __anonenum_VgRes_112 {   2972 enum __anonenum_VgRes_112 {
2973     Vg_LowRes = 0,   2973     Vg_LowRes = 0,
2974     Vg_MedRes = 1,   2974     Vg_MedRes = 1,
2975     Vg_HighRes = 2   2975     Vg_HighRes = 2
2976 } ;   2976 } ;
2977 typedef enum __anonenum_VgRes_112 VgRes;   2977 typedef enum __anonenum_VgRes_112 VgRes;
2978 typedef Int ErrorKind;   2978 typedef Int ErrorKind;
2979 struct _Error;   2979 struct _Error;
2980 typedef struct _Error Error;   2980 typedef struct _Error Error;
2981 typedef Int SuppKind;   2981 typedef Int SuppKind;
2982 struct _Supp;   2982 struct _Supp;
2983 typedef struct _Supp Supp;   2983 typedef struct _Supp Supp;
2984 enum __anonenum_CoreErrorKind_113 {   2984 enum __anonenum_CoreErrorKind_113 {
2985     ThreadErr = -1   2985     ThreadErr = -1
2986 } ;   2986 } ;
2987 typedef enum __anonenum_CoreErrorKind_113 CoreErrorKind;   2987 typedef enum __anonenum_CoreErrorKind_113 CoreErrorKind;
2988 enum __anonenum_PointKind_114 {   2988 enum __anonenum_PointKind_114 {
2989     software_breakpoint = 0,   2989     software_breakpoint = 0,
2990     hardware_breakpoint = 1,   2990     hardware_breakpoint = 1,
2991     write_watchpoint = 2,   2991     write_watchpoint = 2,
2992     read_watchpoint = 3,   2992     read_watchpoint = 3,
2993     access_watchpoint = 4   2993     access_watchpoint = 4
2994 } ;   2994 } ;
2995 typedef enum __anonenum_PointKind_114 PointKind;   2995 typedef enum __anonenum_PointKind_114 PointKind;
2996 enum __anonenum_kwd_report_error_115 {   2996 enum __anonenum_kwd_report_error_115 {
2997     kwd_report_none = 0,   2997     kwd_report_none = 0,
2998     kwd_report_all = 1,   2998     kwd_report_all = 1,
2999     kwd_report_duplicated_matches = 2   2999     kwd_report_duplicated_matches = 2
3000 } ;   3000 } ;
3001 typedef enum __anonenum_kwd_report_error_115 kwd_report_error;   3001 typedef enum __anonenum_kwd_report_error_115 kwd_report_error;
3002 enum __anonenum_FinishReason_116 {   3002 enum __anonenum_FinishReason_116 {
3003     orderly_finish = 0,   3003     orderly_finish = 0,
3004     reset_after_error = 1,   3004     reset_after_error = 1,
3005     reset_after_fork = 2   3005     reset_after_fork = 2
3006 } ;   3006 } ;
3007 typedef enum __anonenum_FinishReason_116 FinishReason;   3007 typedef enum __anonenum_FinishReason_116 FinishReason;
3008 struct __anonstruct_VgdbShared32_117 {   3008 struct __anonstruct_VgdbShared32_117 {
3009    int vgdb_pid ;   3009    int vgdb_pid ;
3010    int volatile   written_by_vgdb ;   3010    int volatile   written_by_vgdb ;
3011    int volatile   seen_by_valgrind ;   3011    int volatile   seen_by_valgrind ;
3012    Addr32 invoke_gdbserver ;   3012    Addr32 invoke_gdbserver ;
3013    Addr32 threads ;   3013    Addr32 threads ;
3014    int sizeof_ThreadState ;   3014    int sizeof_ThreadState ;
3015    int offset_status ;   3015    int offset_status ;
3016    int offset_lwpid ;   3016    int offset_lwpid ;
3017 };   3017 };
3018 typedef struct __anonstruct_VgdbShared32_117 VgdbShared32;   3018 typedef struct __anonstruct_VgdbShared32_117 VgdbShared32;
3019 struct __anonstruct_VgdbShared64_118 {   3019 struct __anonstruct_VgdbShared64_118 {
3020    int vgdb_pid ;   3020    int vgdb_pid ;
3021    int volatile   written_by_vgdb ;   3021    int volatile   written_by_vgdb ;
3022    int volatile   seen_by_valgrind ;   3022    int volatile   seen_by_valgrind ;
3023    Addr64 invoke_gdbserver ;   3023    Addr64 invoke_gdbserver ;
3024    Addr64 threads ;   3024    Addr64 threads ;
3025    int sizeof_ThreadState ;   3025    int sizeof_ThreadState ;
3026    int offset_status ;   3026    int offset_status ;
3027    int offset_lwpid ;   3027    int offset_lwpid ;
3028 };   3028 };
3029 typedef struct __anonstruct_VgdbShared64_118 VgdbShared64;   3029 typedef struct __anonstruct_VgdbShared64_118 VgdbShared64;
3030 typedef VgdbShared32 VgdbShared;   3030 typedef VgdbShared32 VgdbShared;
3031 enum __anonenum_VgMsgKind_119 {   3031 enum __anonenum_VgMsgKind_119 {
3032     Vg_FailMsg = 0,   3032     Vg_FailMsg = 0,
3033     Vg_UserMsg = 1,   3033     Vg_UserMsg = 1,
3034     Vg_DebugMsg = 2,   3034     Vg_DebugMsg = 2,
3035     Vg_ClientMsg = 3   3035     Vg_ClientMsg = 3
3036 } ;   3036 } ;
3037 typedef enum __anonenum_VgMsgKind_119 VgMsgKind;   3037 typedef enum __anonenum_VgMsgKind_119 VgMsgKind;
3038 struct __anonstruct_OutputSink_120 {   3038 struct __anonstruct_OutputSink_120 {
3039    Int fd ;   3039    Int fd ;
3040    Bool is_socket ;   3040    Bool is_socket ;
3041 };   3041 };
3042 typedef struct __anonstruct_OutputSink_120 OutputSink;   3042 typedef struct __anonstruct_OutputSink_120 OutputSink;
3043 typedef void (*vg_atfork_t)(ThreadId  );   3043 typedef void (*vg_atfork_t)(ThreadId  );
3044 typedef Int ArenaId;   3044 typedef Int ArenaId;
3045 struct vg_mallinfo {   3045 struct vg_mallinfo {
3046    int arena ;   3046    int arena ;
3047    int ordblks ;   3047    int ordblks ;
3048    int smblks ;   3048    int smblks ;
3049    int hblks ;   3049    int hblks ;
3050    int hblkhd ;   3050    int hblkhd ;
3051    int usmblks ;   3051    int usmblks ;
3052    int fsmblks ;   3052    int fsmblks ;
3053    int uordblks ;   3053    int uordblks ;
3054    int fordblks ;   3054    int fordblks ;
3055    int keepcost ;   3055    int keepcost ;
3056 };   3056 };
3057 enum __anonenum_VgVgdb_121 {   3057 enum __anonenum_VgVgdb_121 {
3058     Vg_VgdbNo = 0,   3058     Vg_VgdbNo = 0,
3059     Vg_VgdbYes = 1,   3059     Vg_VgdbYes = 1,
3060     Vg_VgdbFull = 2   3060     Vg_VgdbFull = 2
3061 } ;   3061 } ;
3062 typedef enum __anonenum_VgVgdb_121 VgVgdb;   3062 typedef enum __anonenum_VgVgdb_121 VgVgdb;
3063 enum __anonenum_VgSmc_122 {   3063 enum __anonenum_VgSmc_122 {
3064     Vg_SmcNone = 0,   3064     Vg_SmcNone = 0,
3065     Vg_SmcStack = 1,   3065     Vg_SmcStack = 1,
3066     Vg_SmcAll = 2   3066     Vg_SmcAll = 2
3067 } ;   3067 } ;
3068 typedef enum __anonenum_VgSmc_122 VgSmc;   3068 typedef enum __anonenum_VgSmc_122 VgSmc;
3069 struct vg_mallocfunc_info {   3069 struct vg_mallocfunc_info {
3070    void *(*tl_malloc)(ThreadId tid , SizeT n ) ;   3070    void *(*tl_malloc)(ThreadId tid , SizeT n ) ;
3071    void *(*tl___builtin_new)(ThreadId tid , SizeT n ) ;   3071    void *(*tl___builtin_new)(ThreadId tid , SizeT n ) ;
3072    void *(*tl___builtin_vec_new)(ThreadId tid , SizeT n ) ;   3072    void *(*tl___builtin_vec_new)(ThreadId tid , SizeT n ) ;
3073    void *(*tl_memalign)(ThreadId tid , SizeT align , SizeT n ) ;   3073    void *(*tl_memalign)(ThreadId tid , SizeT align , SizeT n ) ;
3074    void *(*tl_calloc)(ThreadId tid , SizeT nmemb , SizeT n ) ;   3074    void *(*tl_calloc)(ThreadId tid , SizeT nmemb , SizeT n ) ;
3075    void (*tl_free)(ThreadId tid , void *p ) ;   3075    void (*tl_free)(ThreadId tid , void *p ) ;
3076    void (*tl___builtin_delete)(ThreadId tid , void *p ) ;   3076    void (*tl___builtin_delete)(ThreadId tid , void *p ) ;
3077    void (*tl___builtin_vec_delete)(ThreadId tid , void *p ) ;   3077    void (*tl___builtin_vec_delete)(ThreadId tid , void *p ) ;
3078    void *(*tl_realloc)(ThreadId tid , void *p , SizeT size ) ;   3078    void *(*tl_realloc)(ThreadId tid , void *p , SizeT size ) ;
3079    SizeT (*tl_malloc_usable_size)(ThreadId tid , void *payload ) ;   3079    SizeT (*tl_malloc_usable_size)(ThreadId tid , void *payload ) ;
3080    void (*mallinfo)(ThreadId tid , struct vg_mallinfo *mi ) ;   3080    void (*mallinfo)(ThreadId tid , struct vg_mallinfo *mi ) ;
3081    Bool clo_trace_malloc ;   3081    Bool clo_trace_malloc ;
3082 };   3082 };
3083 typedef Addr *StackTrace;   3083 typedef Addr *StackTrace;
3084 struct __anonstruct_VgCallbackClosure_123 {   3084 struct __anonstruct_VgCallbackClosure_123 {
3085    Addr64 nraddr ;   3085    Addr64 nraddr ;
3086    Addr64 readdr ;   3086    Addr64 readdr ;
3087    ThreadId tid ;   3087    ThreadId tid ;
3088 };   3088 };
3089 typedef struct __anonstruct_VgCallbackClosure_123 VgCallbackClosure;   3089 typedef struct __anonstruct_VgCallbackClosure_123 VgCallbackClosure;
3090 enum __anonenum_CorePart_124 {   3090 enum __anonenum_CorePart_124 {
3091     Vg_CoreStartup = 1,   3091     Vg_CoreStartup = 1,
3092     Vg_CoreSignal = 2,   3092     Vg_CoreSignal = 2,
3093     Vg_CoreSysCall = 3,   3093     Vg_CoreSysCall = 3,
3094     Vg_CoreSysCallArgInMem = 4,   3094     Vg_CoreSysCallArgInMem = 4,
3095     Vg_CoreTranslate = 5,   3095     Vg_CoreTranslate = 5,
3096     Vg_CoreClientReq = 6   3096     Vg_CoreClientReq = 6
3097 } ;   3097 } ;
3098 typedef enum __anonenum_CorePart_124 CorePart;   3098 typedef enum __anonenum_CorePart_124 CorePart;
3099 struct __anonstruct_VgDetails_125 {   3099 struct __anonstruct_VgDetails_125 {
3100    Char *name ;   3100    Char *name ;
3101    Char *version ;   3101    Char *version ;
3102    Char *description ;   3102    Char *description ;
3103    Char *copyright_author ;   3103    Char *copyright_author ;
3104    Char *bug_reports_to ;   3104    Char *bug_reports_to ;
3105    UInt avg_translation_sizeB ;   3105    UInt avg_translation_sizeB ;
3106 };   3106 };
3107 typedef struct __anonstruct_VgDetails_125 VgDetails;   3107 typedef struct __anonstruct_VgDetails_125 VgDetails;
3108 struct __anonstruct_VgNeeds_126 {   3108 struct __anonstruct_VgNeeds_126 {
3109    Bool libc_freeres ;   3109    Bool libc_freeres ;
3110    Bool core_errors ;   3110    Bool core_errors ;
3111    Bool tool_errors ;   3111    Bool tool_errors ;
3112    Bool superblock_discards ;   3112    Bool superblock_discards ;
3113    Bool command_line_options ;   3113    Bool command_line_options ;
3114    Bool client_requests ;   3114    Bool client_requests ;
3115    Bool syscall_wrapper ;   3115    Bool syscall_wrapper ;
3116    Bool sanity_checks ;   3116    Bool sanity_checks ;
3117    Bool var_info ;   3117    Bool var_info ;
3118    Bool malloc_replacement ;   3118    Bool malloc_replacement ;
3119    Bool xml_output ;   3119    Bool xml_output ;
3120    Bool final_IR_tidy_pass ;   3120    Bool final_IR_tidy_pass ;
3121 };   3121 };
3122 typedef struct __anonstruct_VgNeeds_126 VgNeeds;   3122 typedef struct __anonstruct_VgNeeds_126 VgNeeds;
3123 struct __anonstruct_VgToolInterface_127 {   3123 struct __anonstruct_VgToolInterface_127 {
3124    void (*tool_pre_clo_init)(void) ;   3124    void (*tool_pre_clo_init)(void) ;
3125    void (*tool_post_clo_init)(void) ;   3125    void (*tool_post_clo_init)(void) ;
3126    IRSB *(*tool_instrument)(VgCallbackClosure * , IRSB * , VexGuestLayout * ,   3126    IRSB *(*tool_instrument)(VgCallbackClosure * , IRSB * , VexGuestLayout * ,
3127                             VexGuestExtents * , IRType  , IRType  ) ;   3127                             VexGuestExtents * , IRType  , IRType  ) ;
3128    void (*tool_fini)(Int  ) ;   3128    void (*tool_fini)(Int  ) ;
3129    Bool (*tool_eq_Error)(VgRes  , Error * , Error * ) ;   3129    Bool (*tool_eq_Error)(VgRes  , Error * , Error * ) ;
3130    void (*tool_before_pp_Error)(Error * ) ;   3130    void (*tool_before_pp_Error)(Error * ) ;
3131    void (*tool_pp_Error)(Error * ) ;   3131    void (*tool_pp_Error)(Error * ) ;
3132    Bool tool_show_ThreadIDs_for_errors ;   3132    Bool tool_show_ThreadIDs_for_errors ;
3133    UInt (*tool_update_extra)(Error * ) ;   3133    UInt (*tool_update_extra)(Error * ) ;
3134    Bool (*tool_recognised_suppression)(Char * , Supp * ) ;   3134    Bool (*tool_recognised_suppression)(Char * , Supp * ) ;
3135    Bool (*tool_read_extra_suppression_info)(Int  , Char ** , SizeT * , Supp * ) ;   3135    Bool (*tool_read_extra_suppression_info)(Int  , Char ** , SizeT * , Supp * ) ;
3136    Bool (*tool_error_matches_suppression)(Error * , Supp * ) ;   3136    Bool (*tool_error_matches_suppression)(Error * , Supp * ) ;
3137    Char *(*tool_get_error_name)(Error * ) ;   3137    Char *(*tool_get_error_name)(Error * ) ;
3138    Bool (*tool_get_extra_suppression_info)(Error * , Char * , Int  ) ;   3138    Bool (*tool_get_extra_suppression_info)(Error * , Char * , Int  ) ;
3139    void (*tool_discard_superblock_info)(Addr64  , VexGuestExtents  ) ;   3139    void (*tool_discard_superblock_info)(Addr64  , VexGuestExtents  ) ;
3140    Bool (*tool_process_cmd_line_option)(Char * ) ;   3140    Bool (*tool_process_cmd_line_option)(Char * ) ;
3141    void (*tool_print_usage)(void) ;   3141    void (*tool_print_usage)(void) ;
3142    void (*tool_print_debug_usage)(void) ;   3142    void (*tool_print_debug_usage)(void) ;
3143    Bool (*tool_handle_client_request)(ThreadId  , UWord * , UWord * ) ;   3143    Bool (*tool_handle_client_request)(ThreadId  , UWord * , UWord * ) ;
3144    void (*tool_pre_syscall)(ThreadId  , UInt  , UWord * , UInt  ) ;   3144    void (*tool_pre_syscall)(ThreadId  , UInt  , UWord * , UInt  ) ;
3145    void (*tool_post_syscall)(ThreadId  , UInt  , UWord * , UInt  , SysRes  ) ;   3145    void (*tool_post_syscall)(ThreadId  , UInt  , UWord * , UInt  , SysRes  ) ;
3146    Bool (*tool_cheap_sanity_check)(void) ;   3146    Bool (*tool_cheap_sanity_check)(void) ;
3147    Bool (*tool_expensive_sanity_check)(void) ;   3147    Bool (*tool_expensive_sanity_check)(void) ;
3148    void *(*tool_malloc)(ThreadId  , SizeT  ) ;   3148    void *(*tool_malloc)(ThreadId  , SizeT  ) ;
3149    void *(*tool___builtin_new)(ThreadId  , SizeT  ) ;   3149    void *(*tool___builtin_new)(ThreadId  , SizeT  ) ;
3150    void *(*tool___builtin_vec_new)(ThreadId  , SizeT  ) ;   3150    void *(*tool___builtin_vec_new)(ThreadId  , SizeT  ) ;
3151    void *(*tool_memalign)(ThreadId  , SizeT  , SizeT  ) ;   3151    void *(*tool_memalign)(ThreadId  , SizeT  , SizeT  ) ;
3152    void *(*tool_calloc)(ThreadId  , SizeT  , SizeT  ) ;   3152    void *(*tool_calloc)(ThreadId  , SizeT  , SizeT  ) ;
3153    void (*tool_free)(ThreadId  , void * ) ;   3153    void (*tool_free)(ThreadId  , void * ) ;
3154    void (*tool___builtin_delete)(ThreadId  , void * ) ;   3154    void (*tool___builtin_delete)(ThreadId  , void * ) ;
3155    void (*tool___builtin_vec_delete)(ThreadId  , void * ) ;   3155    void (*tool___builtin_vec_delete)(ThreadId  , void * ) ;
3156    void *(*tool_realloc)(ThreadId  , void * , SizeT  ) ;   3156    void *(*tool_realloc)(ThreadId  , void * , SizeT  ) ;
3157    SizeT (*tool_malloc_usable_size)(ThreadId  , void * ) ;   3157    SizeT (*tool_malloc_usable_size)(ThreadId  , void * ) ;
3158    SizeT tool_client_redzone_szB ;   3158    SizeT tool_client_redzone_szB ;
3159    IRSB *(*tool_final_IR_tidy_pass)(IRSB * ) ;   3159    IRSB *(*tool_final_IR_tidy_pass)(IRSB * ) ;
3160    void (*track_new_mem_startup)(Addr  , SizeT  , Bool  , Bool  , Bool  ,   3160    void (*track_new_mem_startup)(Addr  , SizeT  , Bool  , Bool  , Bool  ,
3161                                  ULong  ) ;   3161                                  ULong  ) ;
3162    void (*track_new_mem_stack_signal)(Addr  , SizeT  , ThreadId  ) ;   3162    void (*track_new_mem_stack_signal)(Addr  , SizeT  , ThreadId  ) ;
3163    void (*track_new_mem_brk)(Addr  , SizeT  , ThreadId  ) ;   3163    void (*track_new_mem_brk)(Addr  , SizeT  , ThreadId  ) ;
3164    void (*track_new_mem_mmap)(Addr  , SizeT  , Bool  , Bool  , Bool  , ULong  ) ;   3164    void (*track_new_mem_mmap)(Addr  , SizeT  , Bool  , Bool  , Bool  , ULong  ) ;
3165    void (*track_copy_mem_remap)(Addr src , Addr dst , SizeT  ) ;   3165    void (*track_copy_mem_remap)(Addr src , Addr dst , SizeT  ) ;
3166    void (*track_change_mem_mprotect)(Addr  , SizeT  , Bool  , Bool  , Bool  ) ;   3166    void (*track_change_mem_mprotect)(Addr  , SizeT  , Bool  , Bool  , Bool  ) ;
3167    void (*track_die_mem_stack_signal)(Addr  , SizeT  ) ;   3167    void (*track_die_mem_stack_signal)(Addr  , SizeT  ) ;
3168    void (*track_die_mem_brk)(Addr  , SizeT  ) ;   3168    void (*track_die_mem_brk)(Addr  , SizeT  ) ;
3169    void (*track_die_mem_munmap)(Addr  , SizeT  ) ;   3169    void (*track_die_mem_munmap)(Addr  , SizeT  ) ;
3170    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_4_w_ECU))(Addr  ,   3170    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_4_w_ECU))(Addr  ,
3171                                                                           UInt  ) ;   3171                                                                           UInt  ) ;
3172    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_8_w_ECU))(Addr  ,   3172    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_8_w_ECU))(Addr  ,
3173                                                                           UInt  ) ;   3173                                                                           UInt  ) ;
3174    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_12_w_ECU))(Addr  ,   3174    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_12_w_ECU))(Addr  ,
3175                                                                            UInt  ) ;   3175                                                                            UInt  ) ;
3176    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_16_w_ECU))(Addr  ,   3176    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_16_w_ECU))(Addr  ,
3177                                                                            UInt  ) ;   3177                                                                            UInt  ) ;
3178    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_32_w_ECU))(Addr  ,   3178    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_32_w_ECU))(Addr  ,
3179                                                                            UInt  ) ;   3179                                                                            UInt  ) ;
3180    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_112_w_ECU))(Addr  ,   3180    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_112_w_ECU))(Addr  ,
3181                                                                             UInt  ) ;   3181                                                                             UInt  ) ;
3182    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_128_w_ECU))(Addr  ,   3182    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_128_w_ECU))(Addr  ,
3183                                                                             UInt  ) ;   3183                                                                             UInt  ) ;
3184    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_144_w_ECU))(Addr  ,   3184    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_144_w_ECU))(Addr  ,
3185                                                                             UInt  ) ;   3185                                                                             UInt  ) ;
3186    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_160_w_ECU))(Addr  ,   3186    void ( __attribute__((__regparm__(2))) (*track_new_mem_stack_160_w_ECU))(Addr  ,
3187                                                                             UInt  ) ;   3187                                                                             UInt  ) ;
3188    void (*track_new_mem_stack_w_ECU)(Addr  , SizeT  , UInt  ) ;   3188    void (*track_new_mem_stack_w_ECU)(Addr  , SizeT  , UInt  ) ;
3189    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_4))(Addr  ) ;   3189    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_4))(Addr  ) ;
3190    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_8))(Addr  ) ;   3190    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_8))(Addr  ) ;
3191    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_12))(Addr  ) ;   3191    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_12))(Addr  ) ;
3192    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_16))(Addr  ) ;   3192    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_16))(Addr  ) ;
3193    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_32))(Addr  ) ;   3193    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_32))(Addr  ) ;
3194    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_112))(Addr  ) ;   3194    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_112))(Addr  ) ;
3195    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_128))(Addr  ) ;   3195    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_128))(Addr  ) ;
3196    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_144))(Addr  ) ;   3196    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_144))(Addr  ) ;
3197    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_160))(Addr  ) ;   3197    void ( __attribute__((__regparm__(1))) (*track_new_mem_stack_160))(Addr  ) ;
3198    void (*track_new_mem_stack)(Addr  , SizeT  ) ;   3198    void (*track_new_mem_stack)(Addr  , SizeT  ) ;
3199    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_4))(Addr  ) ;   3199    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_4))(Addr  ) ;
3200    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_8))(Addr  ) ;   3200    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_8))(Addr  ) ;
3201    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_12))(Addr  ) ;   3201    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_12))(Addr  ) ;
3202    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_16))(Addr  ) ;   3202    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_16))(Addr  ) ;
3203    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_32))(Addr  ) ;   3203    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_32))(Addr  ) ;
3204    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_112))(Addr  ) ;   3204    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_112))(Addr  ) ;
3205    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_128))(Addr  ) ;   3205    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_128))(Addr  ) ;
3206    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_144))(Addr  ) ;   3206    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_144))(Addr  ) ;
3207    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_160))(Addr  ) ;   3207    void ( __attribute__((__regparm__(1))) (*track_die_mem_stack_160))(Addr  ) ;
3208    void (*track_die_mem_stack)(Addr  , SizeT  ) ;   3208    void (*track_die_mem_stack)(Addr  , SizeT  ) ;
3209    void (*track_ban_mem_stack)(Addr  , SizeT  ) ;   3209    void (*track_ban_mem_stack)(Addr  , SizeT  ) ;
3210    void (*track_pre_mem_read)(CorePart  , ThreadId  , Char * , Addr  , SizeT  ) ;   3210    void (*track_pre_mem_read)(CorePart  , ThreadId  , Char * , Addr  , SizeT  ) ;
3211    void (*track_pre_mem_read_asciiz)(CorePart  , ThreadId  , Char * , Addr  ) ;   3211    void (*track_pre_mem_read_asciiz)(CorePart  , ThreadId  , Char * , Addr  ) ;
3212    void (*track_pre_mem_write)(CorePart  , ThreadId  , Char * , Addr  , SizeT  ) ;   3212    void (*track_pre_mem_write)(CorePart  , ThreadId  , Char * , Addr  , SizeT  ) ;
3213    void (*track_post_mem_write)(CorePart  , ThreadId  , Addr  , SizeT  ) ;   3213    void (*track_post_mem_write)(CorePart  , ThreadId  , Addr  , SizeT  ) ;
3214    void (*track_pre_reg_read)(CorePart  , ThreadId  , Char * , PtrdiffT  ,   3214    void (*track_pre_reg_read)(CorePart  , ThreadId  , Char * , PtrdiffT  ,
3215                               SizeT  ) ;   3215                               SizeT  ) ;
3216    void (*track_post_reg_write)(CorePart  , ThreadId  , PtrdiffT  , SizeT  ) ;   3216    void (*track_post_reg_write)(CorePart  , ThreadId  , PtrdiffT  , SizeT  ) ;
3217    void (*track_post_reg_write_clientcall_return)(ThreadId  , PtrdiffT  ,   3217    void (*track_post_reg_write_clientcall_return)(ThreadId  , PtrdiffT  ,
3218                                                   SizeT  , Addr  ) ;   3218                                                   SizeT  , Addr  ) ;
3219    void (*track_start_client_code)(ThreadId  , ULong  ) ;   3219    void (*track_start_client_code)(ThreadId  , ULong  ) ;
3220    void (*track_stop_client_code)(ThreadId  , ULong  ) ;   3220    void (*track_stop_client_code)(ThreadId  , ULong  ) ;
3221    void (*track_pre_thread_ll_create)(ThreadId  , ThreadId  ) ;   3221    void (*track_pre_thread_ll_create)(ThreadId  , ThreadId  ) ;
3222    void (*track_pre_thread_first_insn)(ThreadId  ) ;   3222    void (*track_pre_thread_first_insn)(ThreadId  ) ;
3223    void (*track_pre_thread_ll_exit)(ThreadId  ) ;   3223    void (*track_pre_thread_ll_exit)(ThreadId  ) ;
3224    void (*track_pre_deliver_signal)(ThreadId  , Int sigNo , Bool  ) ;   3224    void (*track_pre_deliver_signal)(ThreadId  , Int sigNo , Bool  ) ;
3225    void (*track_post_deliver_signal)(ThreadId  , Int sigNo ) ;   3225    void (*track_post_deliver_signal)(ThreadId  , Int sigNo ) ;
3226 };   3226 };
3227 typedef struct __anonstruct_VgToolInterface_127 VgToolInterface;   3227 typedef struct __anonstruct_VgToolInterface_127 VgToolInterface;
3228 struct __anonstruct_FastCacheEntry_128 {   3228 struct __anonstruct_FastCacheEntry_128 {
3229    Addr guest ;   3229    Addr guest ;
3230    Addr host ;   3230    Addr host ;
3231 };   3231 };
3232 typedef struct __anonstruct_FastCacheEntry_128 FastCacheEntry;   3232 typedef struct __anonstruct_FastCacheEntry_128 FastCacheEntry;
3233 struct _BBProfEntry {   3233 struct _BBProfEntry {
3234    Addr64 addr ;   3234    Addr64 addr ;
3235    ULong score ;   3235    ULong score ;
3236 };   3236 };
3237 typedef struct _BBProfEntry BBProfEntry;   3237 typedef struct _BBProfEntry BBProfEntry;
3238 enum __anonenum_Vg_FnNameKind_129 {   3238 enum __anonenum_Vg_FnNameKind_129 {
3239     Vg_FnNameNormal = 0,   3239     Vg_FnNameNormal = 0,
3240     Vg_FnNameMain = 1,   3240     Vg_FnNameMain = 1,
3241     Vg_FnNameBelowMain = 2   3241     Vg_FnNameBelowMain = 2
3242 } ;   3242 } ;
3243 typedef enum __anonenum_Vg_FnNameKind_129 Vg_FnNameKind;   3243 typedef enum __anonenum_Vg_FnNameKind_129 Vg_FnNameKind;
3244 struct __anonstruct_StackBlock_130 {   3244 struct __anonstruct_StackBlock_130 {
3245    PtrdiffT base ;   3245    PtrdiffT base ;
3246    SizeT szB ;   3246    SizeT szB ;
3247    Bool spRel ;   3247    Bool spRel ;
3248    Bool isVec ;   3248    Bool isVec ;
3249    HChar name[16] ;   3249    HChar name[16] ;
3250 };   3250 };
3251 typedef struct __anonstruct_StackBlock_130 StackBlock;   3251 typedef struct __anonstruct_StackBlock_130 StackBlock;
3252 struct __anonstruct_GlobalBlock_131 {   3252 struct __anonstruct_GlobalBlock_131 {
3253    Addr addr ;   3253    Addr addr ;
3254    SizeT szB ;   3254    SizeT szB ;
3255    Bool isVec ;   3255    Bool isVec ;
3256    HChar name[16] ;   3256    HChar name[16] ;
3257    HChar soname[16] ;   3257    HChar soname[16] ;
3258 };   3258 };
3259 typedef struct __anonstruct_GlobalBlock_131 GlobalBlock;   3259 typedef struct __anonstruct_GlobalBlock_131 GlobalBlock;
3260 struct _DebugInfo;   3260 struct _DebugInfo;
3261 typedef struct _DebugInfo DebugInfo;   3261 typedef struct _DebugInfo DebugInfo;
3262 enum __anonenum_VgSectKind_132 {   3262 enum __anonenum_VgSectKind_132 {
3263     Vg_SectUnknown = 0,   3263     Vg_SectUnknown = 0,
3264     Vg_SectText = 1,   3264     Vg_SectText = 1,
3265     Vg_SectData = 2,   3265     Vg_SectData = 2,
3266     Vg_SectBSS = 3,   3266     Vg_SectBSS = 3,
3267     Vg_SectGOT = 4,   3267     Vg_SectGOT = 4,
3268     Vg_SectPLT = 5,   3268     Vg_SectPLT = 5,
3269     Vg_SectGOTPLT = 6,   3269     Vg_SectGOTPLT = 6,
3270     Vg_SectOPD = 7   3270     Vg_SectOPD = 7
3271 } ;   3271 } ;
3272 typedef enum __anonenum_VgSectKind_132 VgSectKind;   3272 typedef enum __anonenum_VgSectKind_132 VgSectKind;
3273 struct __anonstruct_D3UnwindRegs_133 {   3273 struct __anonstruct_D3UnwindRegs_133 {
3274    Addr xip ;   3274    Addr xip ;
3275    Addr xsp ;   3275    Addr xsp ;
3276    Addr xbp ;   3276    Addr xbp ;
3277 };   3277 };
3278 typedef struct __anonstruct_D3UnwindRegs_133 D3UnwindRegs;   3278 typedef struct __anonstruct_D3UnwindRegs_133 D3UnwindRegs;
3279 struct __anonstruct_vg_sema_t_134 {   3279 struct __anonstruct_vg_sema_t_134 {
3280    Int pipe[2] ;   3280    Int pipe[2] ;
3281    Int owner_lwpid ;   3281    Int owner_lwpid ;
3282    Bool held_as_LL ;   3282    Bool held_as_LL ;
3283 };   3283 };
3284 typedef struct __anonstruct_vg_sema_t_134 vg_sema_t;   3284 typedef struct __anonstruct_vg_sema_t_134 vg_sema_t;
3285 union __anonunion_u_135 {   3285 union __anonunion_u_135 {
3286    va_list vargs ;   3286    va_list vargs ;
3287    unsigned long uw ;   3287    unsigned long uw ;
3288 };   3288 };
3289 union __anonunion_u_136 {   3289 union __anonunion_u_136 {
3290    va_list vargs ;   3290    va_list vargs ;
3291    unsigned long uw ;   3291    unsigned long uw ;
3292 };   3292 };
3293 __inline static Bool toBool(Int x )   3293 __inline static Bool toBool(Int x )
3294 {   3294 {
3295   Int r ;   3295   Int r ;
3296   int tmp ;   3296   int tmp ;
3297     3297  
3298   {   3298   {
3299   if (x == 0) {   3299   if (x == 0) {
3300     tmp = (int )((Bool )0);   3300     tmp = (int )((Bool )0);
3301   } else {   3301   } else {
3302     tmp = (int )((Bool )1);   3302     tmp = (int )((Bool )1);
3303   }   3303   }
3304   r = tmp;   3304   r = tmp;
3305   return ((Bool )r);   3305   return ((Bool )r);
3306 }   3306 }
3307 }   3307 }
3308 __inline static UChar toUChar(Int x )   3308 __inline static UChar toUChar(Int x )
3309 {   3309 {
3310     3310  
3311     3311  
3312   {   3312   {
3313   x &= 255;   3313   x &= 255;
3314   return ((UChar )x);   3314   return ((UChar )x);
3315 }   3315 }
3316 }   3316 }
3317 __inline static HChar toHChar(Int x )   3317 __inline static HChar toHChar(Int x )
3318 {   3318 {
3319     3319  
3320     3320  
3321   {   3321   {
3322   x &= 255;   3322   x &= 255;
3323   return ((HChar )x);   3323   return ((HChar )x);
3324 }   3324 }
3325 }   3325 }
3326 __inline static UShort toUShort(Int x )   3326 __inline static UShort toUShort(Int x )
3327 {   3327 {
3328     3328  
3329     3329  
3330   {   3330   {
3331   x &= 65535;   3331   x &= 65535;
3332   return ((UShort )x);   3332   return ((UShort )x);
3333 }   3333 }
3334 }   3334 }
3335 __inline static Short toShort(Int x )   3335 __inline static Short toShort(Int x )
3336 {   3336 {
3337     3337  
3338     3338  
3339   {   3339   {
3340   x &= 65535;   3340   x &= 65535;
3341   return ((Short )x);   3341   return ((Short )x);
3342 }   3342 }
3343 }   3343 }
3344 __inline static UInt toUInt(Long x )   3344 __inline static UInt toUInt(Long x )
3345 {   3345 {
3346     3346  
3347     3347  
3348   {   3348   {
3349   x &= 4294967295LL;   3349   x &= 4294967295LL;
3350   return ((UInt )x);   3350   return ((UInt )x);
3351 }   3351 }
3352 }   3352 }
3353 __inline static ULong Ptr_to_ULong(void *p )   3353 __inline static ULong Ptr_to_ULong(void *p )
3354 {   3354 {
3355   UInt w ;   3355   UInt w ;
3356     3356  
3357   {   3357   {
3358   w = (UInt )p;   3358   w = (UInt )p;
3359   return ((ULong )w);   3359   return ((ULong )w);
3360 }   3360 }
3361 }   3361 }
3362 __inline static void *ULong_to_Ptr(ULong n )   3362 __inline static void *ULong_to_Ptr(ULong n )
3363 {   3363 {
3364   UInt w ;   3364   UInt w ;
3365     3365  
3366   {   3366   {
3367   w = (UInt )n;   3367   w = (UInt )n;
3368   return ((void *)w);   3368   return ((void *)w);
3369 }   3369 }
3370 }   3370 }
3371 __inline static Bool sr_isError(SysRes sr )   3371 __inline static Bool sr_isError(SysRes sr )
3372 {   3372 {
3373     3373  
3374     3374  
3375   {   3375   {
3376   return (sr._isError);   3376   return (sr._isError);
3377 }   3377 }
3378 }   3378 }
3379 __inline static UWord sr_Res(SysRes sr )   3379 __inline static UWord sr_Res(SysRes sr )
3380 {   3380 {
3381   UWord tmp ;   3381   UWord tmp ;
3382     3382  
3383   {   3383   {
3384   if (sr._isError) {   3384   if (sr._isError) {
3385     tmp = (UWord )0;   3385     tmp = (UWord )0;
3386   } else {   3386   } else {
3387     tmp = sr._val;   3387     tmp = sr._val;
3388   }   3388   }
3389   return (tmp);   3389   return (tmp);
3390 }   3390 }
3391 }   3391 }
3392 __inline static UWord sr_ResHI(SysRes sr )   3392 __inline static UWord sr_ResHI(SysRes sr )
3393 {   3393 {
3394     3394  
3395     3395  
3396   {   3396   {
3397   return ((UWord )0);   3397   return ((UWord )0);
3398 }   3398 }
3399 }   3399 }
3400 __inline static UWord sr_Err(SysRes sr )   3400 __inline static UWord sr_Err(SysRes sr )
3401 {   3401 {
3402   UWord tmp ;   3402   UWord tmp ;
3403     3403  
3404   {   3404   {
3405   if (sr._isError) {   3405   if (sr._isError) {
3406     tmp = sr._val;   3406     tmp = sr._val;
3407   } else {   3407   } else {
3408     tmp = (UWord )0;   3408     tmp = (UWord )0;
3409   }   3409   }
3410   return (tmp);   3410   return (tmp);
3411 }   3411 }
3412 }   3412 }
3413 __inline static Bool sr_EQ(SysRes sr1 , SysRes sr2 )   3413 __inline static Bool sr_EQ(SysRes sr1 , SysRes sr2 )
3414 {   3414 {
3415   int tmp ;   3415   int tmp ;
3416     3416  
3417   {   3417   {
3418   if (sr1._val == sr2._val) {   3418   if (sr1._val == sr2._val) {
3419     if (sr1._isError) {   3419     if (sr1._isError) {
3420       if (sr2._isError) {   3420       if (sr2._isError) {
3421         tmp = 1;   3421         tmp = 1;
3422       } else {   3422       } else {
3423         goto _L;   3423         goto _L;
3424       }   3424       }
3425     } else   3425     } else
3426     _L: /* CIL Label */   3426     _L: /* CIL Label */
3427     if (! sr1._isError) {   3427     if (! sr1._isError) {
3428       if (! sr2._isError) {   3428       if (! sr2._isError) {
3429         tmp = 1;   3429         tmp = 1;
3430       } else {   3430       } else {
3431         tmp = 0;   3431         tmp = 0;
3432       }   3432       }
3433     } else {   3433     } else {
3434       tmp = 0;   3434       tmp = 0;
3435     }   3435     }
3436   } else {   3436   } else {
3437     tmp = 0;   3437     tmp = 0;
3438   }   3438   }
3439   return ((Bool )tmp);   3439   return ((Bool )tmp);
3440 }   3440 }
3441 }   3441 }
3442 extern void ppIRType(IRType  ) ;   3442 extern void ppIRType(IRType  ) ;
3443 extern Int sizeofIRType(IRType  ) ;   3443 extern Int sizeofIRType(IRType  ) ;
3444 extern IRConst *IRConst_U1(Bool  ) ;   3444 extern IRConst *IRConst_U1(Bool  ) ;
3445 extern IRConst *IRConst_U8(UChar  ) ;   3445 extern IRConst *IRConst_U8(UChar  ) ;
3446 extern IRConst *IRConst_U16(UShort  ) ;   3446 extern IRConst *IRConst_U16(UShort  ) ;
3447 extern IRConst *IRConst_U32(UInt  ) ;   3447 extern IRConst *IRConst_U32(UInt  ) ;
3448 extern IRConst *IRConst_U64(ULong  ) ;   3448 extern IRConst *IRConst_U64(ULong  ) ;
3449 extern IRConst *IRConst_F32(Float  ) ;   3449 extern IRConst *IRConst_F32(Float  ) ;
3450 extern IRConst *IRConst_F32i(UInt  ) ;   3450 extern IRConst *IRConst_F32i(UInt  ) ;
3451 extern IRConst *IRConst_F64(Double  ) ;   3451 extern IRConst *IRConst_F64(Double  ) ;
3452 extern IRConst *IRConst_F64i(ULong  ) ;   3452 extern IRConst *IRConst_F64i(ULong  ) ;
3453 extern IRConst *IRConst_V128(UShort  ) ;   3453 extern IRConst *IRConst_V128(UShort  ) ;
3454 extern IRConst *deepCopyIRConst(IRConst * ) ;   3454 extern IRConst *deepCopyIRConst(IRConst * ) ;
3455 extern void ppIRConst(IRConst * ) ;   3455 extern void ppIRConst(IRConst * ) ;
3456 extern Bool eqIRConst(IRConst * , IRConst * ) ;   3456 extern Bool eqIRConst(IRConst * , IRConst * ) ;
3457 extern IRCallee *mkIRCallee(Int regparms , HChar *name , void *addr ) ;   3457 extern IRCallee *mkIRCallee(Int regparms , HChar *name , void *addr ) ;
3458 extern IRCallee *deepCopyIRCallee(IRCallee * ) ;   3458 extern IRCallee *deepCopyIRCallee(IRCallee * ) ;
3459 extern void ppIRCallee(IRCallee * ) ;   3459 extern void ppIRCallee(IRCallee * ) ;
3460 extern IRRegArray *mkIRRegArray(Int  , IRType  , Int  ) ;   3460 extern IRRegArray *mkIRRegArray(Int  , IRType  , Int  ) ;
3461 extern IRRegArray *deepCopyIRRegArray(IRRegArray * ) ;   3461 extern IRRegArray *deepCopyIRRegArray(IRRegArray * ) ;
3462 extern void ppIRRegArray(IRRegArray * ) ;   3462 extern void ppIRRegArray(IRRegArray * ) ;
3463 extern Bool eqIRRegArray(IRRegArray * , IRRegArray * ) ;   3463 extern Bool eqIRRegArray(IRRegArray * , IRRegArray * ) ;
3464 extern void ppIRTemp(IRTemp  ) ;   3464 extern void ppIRTemp(IRTemp  ) ;
3465 extern void ppIROp(IROp  ) ;   3465 extern void ppIROp(IROp  ) ;
3466 extern IRExpr *IRExpr_Binder(Int binder ) ;   3466 extern IRExpr *IRExpr_Binder(Int binder ) ;
3467 extern IRExpr *IRExpr_Get(Int off , IRType ty ) ;   3467 extern IRExpr *IRExpr_Get(Int off , IRType ty ) ;
3468 extern IRExpr *IRExpr_GetI(IRRegArray *descr , IRExpr *ix , Int bias ) ;   3468 extern IRExpr *IRExpr_GetI(IRRegArray *descr , IRExpr *ix , Int bias ) ;
3469 extern IRExpr *IRExpr_RdTmp(IRTemp tmp ) ;   3469 extern IRExpr *IRExpr_RdTmp(IRTemp tmp ) ;
3470 extern IRExpr *IRExpr_Qop(IROp op , IRExpr *arg1 , IRExpr *arg2 , IRExpr *arg3 ,   3470 extern IRExpr *IRExpr_Qop(IROp op , IRExpr *arg1 , IRExpr *arg2 , IRExpr *arg3 ,
3471                           IRExpr *arg4 ) ;   3471                           IRExpr *arg4 ) ;
3472 extern IRExpr *IRExpr_Triop(IROp op , IRExpr *arg1 , IRExpr *arg2 ,   3472 extern IRExpr *IRExpr_Triop(IROp op , IRExpr *arg1 , IRExpr *arg2 ,
3473                             IRExpr *arg3 ) ;   3473                             IRExpr *arg3 ) ;
3474 extern IRExpr *IRExpr_Binop(IROp op , IRExpr *arg1 , IRExpr *arg2 ) ;   3474 extern IRExpr *IRExpr_Binop(IROp op , IRExpr *arg1 , IRExpr *arg2 ) ;
3475 extern IRExpr *IRExpr_Unop(IROp op , IRExpr *arg ) ;   3475 extern IRExpr *IRExpr_Unop(IROp op , IRExpr *arg ) ;
3476 extern IRExpr *IRExpr_Load(IREndness end , IRType ty , IRExpr *addr ) ;   3476 extern IRExpr *IRExpr_Load(IREndness end , IRType ty , IRExpr *addr ) ;
3477 extern IRExpr *IRExpr_Const(IRConst *con ) ;   3477 extern IRExpr *IRExpr_Const(IRConst *con ) ;
3478 extern IRExpr *IRExpr_CCall(IRCallee *cee , IRType retty , IRExpr **args ) ;   3478 extern IRExpr *IRExpr_CCall(IRCallee *cee , IRType retty , IRExpr **args ) ;
3479 extern IRExpr *IRExpr_Mux0X(IRExpr *cond , IRExpr *expr0 , IRExpr *exprX ) ;   3479 extern IRExpr *IRExpr_Mux0X(IRExpr *cond , IRExpr *expr0 , IRExpr *exprX ) ;
3480 extern IRExpr *deepCopyIRExpr(IRExpr * ) ;   3480 extern IRExpr *deepCopyIRExpr(IRExpr * ) ;
3481 extern void ppIRExpr(IRExpr * ) ;   3481 extern void ppIRExpr(IRExpr * ) ;
3482 extern IRExpr **mkIRExprVec_0(void) ;   3482 extern IRExpr **mkIRExprVec_0(void) ;
3483 extern IRExpr **mkIRExprVec_1(IRExpr * ) ;   3483 extern IRExpr **mkIRExprVec_1(IRExpr * ) ;
3484 extern IRExpr **mkIRExprVec_2(IRExpr * , IRExpr * ) ;   3484 extern IRExpr **mkIRExprVec_2(IRExpr * , IRExpr * ) ;
3485 extern IRExpr **mkIRExprVec_3(IRExpr * , IRExpr * , IRExpr * ) ;   3485 extern IRExpr **mkIRExprVec_3(IRExpr * , IRExpr * , IRExpr * ) ;
3486 extern IRExpr **mkIRExprVec_4(IRExpr * , IRExpr * , IRExpr * , IRExpr * ) ;   3486 extern IRExpr **mkIRExprVec_4(IRExpr * , IRExpr * , IRExpr * , IRExpr * ) ;
3487 extern IRExpr **mkIRExprVec_5(IRExpr * , IRExpr * , IRExpr * , IRExpr * ,   3487 extern IRExpr **mkIRExprVec_5(IRExpr * , IRExpr * , IRExpr * , IRExpr * ,
3488                               IRExpr * ) ;   3488                               IRExpr * ) ;
3489 extern IRExpr **mkIRExprVec_6(IRExpr * , IRExpr * , IRExpr * , IRExpr * ,   3489 extern IRExpr **mkIRExprVec_6(IRExpr * , IRExpr * , IRExpr * , IRExpr * ,
3490                               IRExpr * , IRExpr * ) ;   3490                               IRExpr * , IRExpr * ) ;
3491 extern IRExpr **mkIRExprVec_7(IRExpr * , IRExpr * , IRExpr * , IRExpr * ,   3491 extern IRExpr **mkIRExprVec_7(IRExpr * , IRExpr * , IRExpr * , IRExpr * ,
3492                               IRExpr * , IRExpr * , IRExpr * ) ;   3492                               IRExpr * , IRExpr * , IRExpr * ) ;
3493 extern IRExpr **mkIRExprVec_8(IRExpr * , IRExpr * , IRExpr * , IRExpr * ,   3493 extern IRExpr **mkIRExprVec_8(IRExpr * , IRExpr * , IRExpr * , IRExpr * ,
3494                               IRExpr * , IRExpr * , IRExpr * , IRExpr * ) ;   3494                               IRExpr * , IRExpr * , IRExpr * , IRExpr * ) ;
3495 extern IRExpr **shallowCopyIRExprVec(IRExpr ** ) ;   3495 extern IRExpr **shallowCopyIRExprVec(IRExpr ** ) ;
3496 extern IRExpr **deepCopyIRExprVec(IRExpr ** ) ;   3496 extern IRExpr **deepCopyIRExprVec(IRExpr ** ) ;
3497 extern IRExpr *mkIRExpr_HWord(HWord  ) ;   3497 extern IRExpr *mkIRExpr_HWord(HWord  ) ;
3498 extern IRExpr *mkIRExprCCall(IRType retty , Int regparms , HChar *name ,   3498 extern IRExpr *mkIRExprCCall(IRType retty , Int regparms , HChar *name ,
3499                              void *addr , IRExpr **args ) ;   3499                              void *addr , IRExpr **args ) ;
3500 __inline static Bool isIRAtom(IRExpr *e )   3500 __inline static Bool isIRAtom(IRExpr *e )
3501 {   3501 {
3502   int tmp ;   3502   int tmp ;
3503   Bool tmp___0 ;   3503   Bool tmp___0 ;
3504     3504  
3505   {   3505   {
3506   if ((unsigned int )e->tag == 86019U) {   3506   if ((unsigned int )e->tag == 86019U) {
3507     tmp = 1;   3507     tmp = 1;
3508   } else   3508   } else
3509   if ((unsigned int )e->tag == 86025U) {   3509   if ((unsigned int )e->tag == 86025U) {
3510     tmp = 1;   3510     tmp = 1;
3511   } else {   3511   } else {
3512     tmp = 0;   3512     tmp = 0;
3513   }   3513   }
3514   tmp___0 = toBool(tmp);   3514   tmp___0 = toBool(tmp);
3515   return (tmp___0);   3515   return (tmp___0);
3516 }   3516 }
3517 }   3517 }
3518 extern Bool eqIRAtom(IRExpr * , IRExpr * ) ;   3518 extern Bool eqIRAtom(IRExpr * , IRExpr * ) ;
3519 extern void ppIRJumpKind(IRJumpKind  ) ;   3519 extern void ppIRJumpKind(IRJumpKind  ) ;
3520 extern void ppIREffect(IREffect  ) ;   3520 extern void ppIREffect(IREffect  ) ;
3521 extern void ppIRDirty(IRDirty * ) ;   3521 extern void ppIRDirty(IRDirty * ) ;
3522 extern IRDirty *emptyIRDirty(void) ;   3522 extern IRDirty *emptyIRDirty(void) ;
3523 extern IRDirty *deepCopyIRDirty(IRDirty * ) ;   3523 extern IRDirty *deepCopyIRDirty(IRDirty * ) ;
3524 extern IRDirty *unsafeIRDirty_0_N(Int regparms , HChar *name , void *addr ,   3524 extern IRDirty *unsafeIRDirty_0_N(Int regparms , HChar *name , void *addr ,
3525                                   IRExpr **args ) ;   3525                                   IRExpr **args ) ;
3526 extern IRDirty *unsafeIRDirty_1_N(IRTemp dst , Int regparms , HChar *name ,   3526 extern IRDirty *unsafeIRDirty_1_N(IRTemp dst , Int regparms , HChar *name ,
3527                                   void *addr , IRExpr **args ) ;   3527                                   void *addr , IRExpr **args ) ;
3528 extern void ppIRMBusEvent(IRMBusEvent  ) ;   3528 extern void ppIRMBusEvent(IRMBusEvent  ) ;
3529 extern void ppIRCAS(IRCAS *cas ) ;   3529 extern void ppIRCAS(IRCAS *cas ) ;
3530 extern IRCAS *mkIRCAS(IRTemp oldHi , IRTemp oldLo , IREndness end ,   3530 extern IRCAS *mkIRCAS(IRTemp oldHi , IRTemp oldLo , IREndness end ,
3531                       IRExpr *addr , IRExpr *expdHi , IRExpr *expdLo ,   3531                       IRExpr *addr , IRExpr *expdHi , IRExpr *expdLo ,
3532                       IRExpr *dataHi , IRExpr *dataLo ) ;   3532                       IRExpr *dataHi , IRExpr *dataLo ) ;
3533 extern IRCAS *deepCopyIRCAS(IRCAS * ) ;   3533 extern IRCAS *deepCopyIRCAS(IRCAS * ) ;
3534 extern IRStmt *IRStmt_NoOp(void) ;   3534 extern IRStmt *IRStmt_NoOp(void) ;
3535 extern IRStmt *IRStmt_IMark(Addr64 addr , Int len ) ;   3535 extern IRStmt *IRStmt_IMark(Addr64 addr , Int len ) ;
3536 extern IRStmt *IRStmt_AbiHint(IRExpr *base , Int len , IRExpr *nia ) ;   3536 extern IRStmt *IRStmt_AbiHint(IRExpr *base , Int len , IRExpr *nia ) ;
3537 extern IRStmt *IRStmt_Put(Int off , IRExpr *data ) ;   3537 extern IRStmt *IRStmt_Put(Int off , IRExpr *data ) ;
3538 extern IRStmt *IRStmt_PutI(IRRegArray *descr , IRExpr *ix , Int bias ,   3538 extern IRStmt *IRStmt_PutI(IRRegArray *descr , IRExpr *ix , Int bias ,
3539                            IRExpr *data ) ;   3539                            IRExpr *data ) ;
3540 extern IRStmt *IRStmt_WrTmp(IRTemp tmp , IRExpr *data ) ;   3540 extern IRStmt *IRStmt_WrTmp(IRTemp tmp , IRExpr *data ) ;
3541 extern IRStmt *IRStmt_Store(IREndness end , IRExpr *addr , IRExpr *data ) ;   3541 extern IRStmt *IRStmt_Store(IREndness end , IRExpr *addr , IRExpr *data ) ;
3542 extern IRStmt *IRStmt_CAS(IRCAS *details ) ;   3542 extern IRStmt *IRStmt_CAS(IRCAS *details ) ;
3543 extern IRStmt *IRStmt_LLSC(IREndness end , IRTemp result , IRExpr *addr ,   3543 extern IRStmt *IRStmt_LLSC(IREndness end , IRTemp result , IRExpr *addr ,
3544                            IRExpr *storedata ) ;   3544                            IRExpr *storedata ) ;
3545 extern IRStmt *IRStmt_Dirty(IRDirty *details ) ;   3545 extern IRStmt *IRStmt_Dirty(IRDirty *details ) ;
3546 extern IRStmt *IRStmt_MBE(IRMBusEvent event ) ;   3546 extern IRStmt *IRStmt_MBE(IRMBusEvent event ) ;
3547 extern IRStmt *IRStmt_Exit(IRExpr *guard , IRJumpKind jk , IRConst *dst ) ;   3547 extern IRStmt *IRStmt_Exit(IRExpr *guard , IRJumpKind jk , IRConst *dst ) ;
3548 extern IRStmt *deepCopyIRStmt(IRStmt * ) ;   3548 extern IRStmt *deepCopyIRStmt(IRStmt * ) ;
3549 extern void ppIRStmt(IRStmt * ) ;   3549 extern void ppIRStmt(IRStmt * ) ;
3550 extern IRTemp newIRTemp(IRTypeEnv * , IRType  ) ;   3550 extern IRTemp newIRTemp(IRTypeEnv * , IRType  ) ;
3551 extern IRTypeEnv *deepCopyIRTypeEnv(IRTypeEnv * ) ;   3551 extern IRTypeEnv *deepCopyIRTypeEnv(IRTypeEnv * ) ;
3552 extern void ppIRTypeEnv(IRTypeEnv * ) ;   3552 extern void ppIRTypeEnv(IRTypeEnv * ) ;
3553 extern IRSB *emptyIRSB(void) ;   3553 extern IRSB *emptyIRSB(void) ;
3554 extern IRSB *deepCopyIRSB(IRSB * ) ;   3554 extern IRSB *deepCopyIRSB(IRSB * ) ;
3555 extern IRSB *deepCopyIRSBExceptStmts(IRSB * ) ;   3555 extern IRSB *deepCopyIRSBExceptStmts(IRSB * ) ;
3556 extern void ppIRSB(IRSB * ) ;   3556 extern void ppIRSB(IRSB * ) ;
3557 extern void addStmtToIRSB(IRSB * , IRStmt * ) ;   3557 extern void addStmtToIRSB(IRSB * , IRStmt * ) ;
3558 extern IRTypeEnv *emptyIRTypeEnv(void) ;   3558 extern IRTypeEnv *emptyIRTypeEnv(void) ;
3559 extern IRType typeOfIRConst(IRConst * ) ;   3559 extern IRType typeOfIRConst(IRConst * ) ;
3560 extern IRType typeOfIRTemp(IRTypeEnv * , IRTemp  ) ;   3560 extern IRType typeOfIRTemp(IRTypeEnv * , IRTemp  ) ;
3561 extern IRType typeOfIRExpr(IRTypeEnv * , IRExpr * ) ;   3561 extern IRType typeOfIRExpr(IRTypeEnv * , IRExpr * ) ;
3562 extern void sanityCheckIRSB(IRSB *bb , HChar *caller , Bool require_flatness ,   3562 extern void sanityCheckIRSB(IRSB *bb , HChar *caller , Bool require_flatness ,
3563                             IRType guest_word_size ) ;   3563                             IRType guest_word_size ) ;
3564 extern Bool isFlatIRStmt(IRStmt * ) ;   3564 extern Bool isFlatIRStmt(IRStmt * ) ;
3565 extern Bool isPlausibleIRType(IRType ty ) ;   3565 extern Bool isPlausibleIRType(IRType ty ) ;
3566 extern HChar const   *LibVEX_ppVexArch(VexArch  ) ;   3566 extern HChar const   *LibVEX_ppVexArch(VexArch  ) ;
3567 extern HChar const   *LibVEX_ppVexHwCaps(VexArch  , UInt  ) ;   3567 extern HChar const   *LibVEX_ppVexHwCaps(VexArch  , UInt  ) ;
3568 extern void LibVEX_default_VexArchInfo(VexArchInfo *vai ) ;   3568 extern void LibVEX_default_VexArchInfo(VexArchInfo *vai ) ;
3569 extern void LibVEX_default_VexAbiInfo(VexAbiInfo *vbi ) ;   3569 extern void LibVEX_default_VexAbiInfo(VexAbiInfo *vbi ) ;
3570 extern void LibVEX_default_VexControl(VexControl *vcon ) ;   3570 extern void LibVEX_default_VexControl(VexControl *vcon ) ;
3571 extern HChar *private_LibVEX_alloc_first ;   3571 extern HChar *private_LibVEX_alloc_first ;
3572 extern HChar *private_LibVEX_alloc_curr ;   3572 extern HChar *private_LibVEX_alloc_curr ;
3573 extern HChar *private_LibVEX_alloc_last ;   3573 extern HChar *private_LibVEX_alloc_last ;
3574 extern  __attribute__((__noreturn__)) void private_LibVEX_alloc_OOM(void) ;   3574 extern  __attribute__((__noreturn__)) void private_LibVEX_alloc_OOM(void) ;
3575 __inline static void *LibVEX_Alloc(Int nbytes )   3575 __inline static void *LibVEX_Alloc(Int nbytes )
3576 {   3576 {
3577   HChar *curr ;   3577   HChar *curr ;
3578   HChar *next ;   3578   HChar *next ;
3579   Int ALIGN ;   3579   Int ALIGN ;
3580     3580  
3581   {   3581   {
3582   ALIGN = (Int )(sizeof(void *) - 1U);   3582   ALIGN = (Int )(sizeof(void *) - 1U);
3583   nbytes = (nbytes + ALIGN) & ~ ALIGN;   3583   nbytes = (nbytes + ALIGN) & ~ ALIGN;
3584   curr = private_LibVEX_alloc_curr;   3584   curr = private_LibVEX_alloc_curr;
3585   next = curr + nbytes;   3585   next = curr + nbytes;
3586   if ((unsigned int )next >= (unsigned int )private_LibVEX_alloc_last) {   3586   if ((unsigned int )next >= (unsigned int )private_LibVEX_alloc_last) {
3587     private_LibVEX_alloc_OOM();   3587     private_LibVEX_alloc_OOM();
3588   } else {   3588   } else {
3589     3589  
3590   }   3590   }
3591   private_LibVEX_alloc_curr = next;   3591   private_LibVEX_alloc_curr = next;
3592   return ((void *)curr);   3592   return ((void *)curr);
3593 }   3593 }
3594 }   3594 }
3595 extern void LibVEX_ShowAllocStats(void) ;   3595 extern void LibVEX_ShowAllocStats(void) ;
3596 extern void LibVEX_Init( __attribute__((__noreturn__)) void (*failure_exit)(void) ,   3596 extern void LibVEX_Init( __attribute__((__noreturn__)) void (*failure_exit)(void) ,
3597                         void (*log_bytes)(HChar * , Int nbytes ) ,   3597                         void (*log_bytes)(HChar * , Int nbytes ) ,
3598                         Int debuglevel , Bool valgrind_support ,   3598                         Int debuglevel , Bool valgrind_support ,
3599                         VexControl *vcon ) ;   3599                         VexControl *vcon ) ;
3600 extern VexTranslateResult LibVEX_Translate(VexTranslateArgs * ) ;   3600 extern VexTranslateResult LibVEX_Translate(VexTranslateArgs * ) ;
3601 extern void LibVEX_ShowStats(void) ;   3601 extern void LibVEX_ShowStats(void) ;
3602 extern HChar *LibVEX_EmWarn_string(VexEmWarn  ) ;   3602 extern HChar *LibVEX_EmWarn_string(VexEmWarn  ) ;
3603 extern void LibVEX_GuestX86_initialise(VexGuestX86State *vex_state ) ;   3603 extern void LibVEX_GuestX86_initialise(VexGuestX86State *vex_state ) ;
3604 extern UInt LibVEX_GuestX86_get_eflags(VexGuestX86State *vex_state ) ;   3604 extern UInt LibVEX_GuestX86_get_eflags(VexGuestX86State *vex_state ) ;
3605 extern void LibVEX_GuestX86_put_eflag_c(UInt new_carry_flag ,   3605 extern void LibVEX_GuestX86_put_eflag_c(UInt new_carry_flag ,
3606                                         VexGuestX86State *vex_state ) ;   3606                                         VexGuestX86State *vex_state ) ;
3607 extern void vgPlain_debugLog_startup(Int level , HChar *who ) ;   3607 extern void vgPlain_debugLog_startup(Int level , HChar *who ) ;
3608 extern Int vgPlain_debugLog_getLevel(void) ;   3608 extern Int vgPlain_debugLog_getLevel(void) ;
3609 extern void ( /* format attribute */  vgPlain_debugLog)(Int level ,   3609 extern void ( /* format attribute */  vgPlain_debugLog)(Int level ,
3610                                                         HChar const   *modulename ,   3610                                                         HChar const   *modulename ,
3611                                                         HChar const   *format   3611                                                         HChar const   *format
3612                                                         , ...) ;   3612                                                         , ...) ;
3613 extern UInt vgPlain_debugLog_vprintf(void (*send_fn)(HChar  , void * ) ,   3613 extern UInt vgPlain_debugLog_vprintf(void (*send_fn)(HChar  , void * ) ,
3614                                      void *send_arg2 , HChar const   *format ,   3614                                      void *send_arg2 , HChar const   *format ,
3615                                      va_list vargs ) ;   3615                                      va_list vargs ) ;
3616 __inline static struct vki_cmsghdr *__vki_cmsg_nxthdr(void *__ctl ,   3616 __inline static struct vki_cmsghdr *__vki_cmsg_nxthdr(void *__ctl ,
3617                                                       __vki_kernel_size_t __size ,   3617                                                       __vki_kernel_size_t __size ,
3618                                                       struct vki_cmsghdr *__cmsg )   3618                                                       struct vki_cmsghdr *__cmsg )
3619 {   3619 {
3620   struct vki_cmsghdr *__ptr ;   3620   struct vki_cmsghdr *__ptr ;
3621     3621  
3622   {   3622   {
3623   __ptr = (struct vki_cmsghdr *)((unsigned char *)__cmsg + (((__cmsg->cmsg_len + sizeof(long )) - 1U) & ~ (sizeof(long ) - 1U)));   3623   __ptr = (struct vki_cmsghdr *)((unsigned char *)__cmsg + (((__cmsg->cmsg_len + sizeof(long )) - 1U) & ~ (sizeof(long ) - 1U)));
3624   if ((unsigned long )((char *)(__ptr + 1) - (char *)__ctl) > (unsigned long )__size) {   3624   if ((unsigned long )((char *)(__ptr + 1) - (char *)__ctl) > (unsigned long )__size) {
3625     return ((struct vki_cmsghdr *)0);   3625     return ((struct vki_cmsghdr *)0);
3626   } else {   3626   } else {
3627     3627  
3628   }   3628   }
3629   return (__ptr);   3629   return (__ptr);
3630 }   3630 }
3631 }   3631 }
3632 __inline static struct vki_cmsghdr *vki_cmsg_nxthdr(struct vki_msghdr *__msg ,   3632 __inline static struct vki_cmsghdr *vki_cmsg_nxthdr(struct vki_msghdr *__msg ,
3633                                                     struct vki_cmsghdr *__cmsg )   3633                                                     struct vki_cmsghdr *__cmsg )
3634 {   3634 {
3635   struct vki_cmsghdr *tmp ;   3635   struct vki_cmsghdr *tmp ;
3636     3636  
3637   {   3637   {
3638   tmp = __vki_cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg);   3638   tmp = __vki_cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg);
3639   return (tmp);   3639   return (tmp);
3640 }   3640 }
3641 }   3641 }
3642 extern void vgPlain_vki_do_initial_consistency_checks(void) ;   3642 extern void vgPlain_vki_do_initial_consistency_checks(void) ;
3643 extern Char *vgPlain_sysnum_string(Word sysnum , SizeT n_buf , Char *buf ) ;   3643 extern Char *vgPlain_sysnum_string(Word sysnum , SizeT n_buf , Char *buf ) ;
3644 extern Char *vgPlain_sysnum_string_extra(Word sysnum , SizeT n_buf , Char *buf ) ;   3644 extern Char *vgPlain_sysnum_string_extra(Word sysnum , SizeT n_buf , Char *buf ) ;
3645 extern  __attribute__((__nothrow__)) int setjmp(struct __jmp_buf_tag *__env ) ;   3645 extern  __attribute__((__nothrow__)) int setjmp(struct __jmp_buf_tag *__env ) ;
3646 extern  __attribute__((__nothrow__)) int __sigsetjmp(struct __jmp_buf_tag *__env ,   3646 extern  __attribute__((__nothrow__)) int __sigsetjmp(struct __jmp_buf_tag *__env ,
3647                                                      int __savemask ) ;   3647                                                      int __savemask ) ;
3648 extern  __attribute__((__nothrow__)) int _setjmp(struct __jmp_buf_tag *__env ) ;   3648 extern  __attribute__((__nothrow__)) int _setjmp(struct __jmp_buf_tag *__env ) ;
3649 extern  __attribute__((__nothrow__,   3649 extern  __attribute__((__nothrow__,
3650 __noreturn__)) void longjmp(struct __jmp_buf_tag *__env , int __val ) ;   3650 __noreturn__)) void longjmp(struct __jmp_buf_tag *__env , int __val ) ;
3651 extern  __attribute__((__nothrow__,   3651 extern  __attribute__((__nothrow__,
3652 __noreturn__)) void _longjmp(struct __jmp_buf_tag *__env , int __val ) ;   3652 __noreturn__)) void _longjmp(struct __jmp_buf_tag *__env , int __val ) ;
3653 extern  __attribute__((__nothrow__,   3653 extern  __attribute__((__nothrow__,
3654 __noreturn__)) void siglongjmp(struct __jmp_buf_tag *__env , int __val ) ;   3654 __noreturn__)) void siglongjmp(struct __jmp_buf_tag *__env , int __val ) ;
3655 extern ThreadId vgPlain_get_running_tid(void) ;   3655 extern ThreadId vgPlain_get_running_tid(void) ;
3656 extern ThreadState vgPlain_threads[500] ;   3656 extern ThreadState vgPlain_threads[500] ;
3657 extern ThreadId vgPlain_running_tid ;   3657 extern ThreadId vgPlain_running_tid ;
3658 extern HChar const   *vgPlain_name_of_ThreadStatus(ThreadStatus status ) ;   3658 extern HChar const   *vgPlain_name_of_ThreadStatus(ThreadStatus status ) ;
3659 extern ThreadState *vgPlain_get_ThreadState(ThreadId tid ) ;   3659 extern ThreadState *vgPlain_get_ThreadState(ThreadId tid ) ;
3660 extern Bool vgPlain_is_valid_tid(ThreadId tid ) ;   3660 extern Bool vgPlain_is_valid_tid(ThreadId tid ) ;
3661 extern Bool vgPlain_is_running_thread(ThreadId tid ) ;   3661 extern Bool vgPlain_is_running_thread(ThreadId tid ) ;
3662 extern Bool vgPlain_is_exiting(ThreadId tid ) ;   3662 extern Bool vgPlain_is_exiting(ThreadId tid ) ;
3663 extern Int vgPlain_count_living_threads(void) ;   3663 extern Int vgPlain_count_living_threads(void) ;
3664 extern Int vgPlain_count_runnable_threads(void) ;   3664 extern Int vgPlain_count_runnable_threads(void) ;
3665 extern ThreadId vgPlain_lwpid_to_vgtid(Int lwpid ) ;   3665 extern ThreadId vgPlain_lwpid_to_vgtid(Int lwpid ) ;
3666 extern Int vgPlain_am_get_segment_starts(Addr *starts , Int nStarts ) ;   3666 extern Int vgPlain_am_get_segment_starts(Addr *starts , Int nStarts ) ;
3667 extern NSegment const   *vgPlain_am_find_nsegment(Addr a ) ;   3667 extern NSegment const   *vgPlain_am_find_nsegment(Addr a ) ;
3668 extern HChar *vgPlain_am_get_filename(NSegment const   * ) ;   3668 extern HChar *vgPlain_am_get_filename(NSegment const   * ) ;
3669 extern Bool vgPlain_am_is_valid_for_client(Addr start , SizeT len , UInt prot ) ;   3669 extern Bool vgPlain_am_is_valid_for_client(Addr start , SizeT len , UInt prot ) ;
3670 extern void *vgPlain_am_shadow_alloc(SizeT size ) ;   3670 extern void *vgPlain_am_shadow_alloc(SizeT size ) ;
3671 extern SysRes vgPlain_am_munmap_valgrind(Addr start , SizeT length ) ;   3671 extern SysRes vgPlain_am_munmap_valgrind(Addr start , SizeT length ) ;
3672 extern Addr vgPlain_am_startup(Addr sp_at_startup ) ;   3672 extern Addr vgPlain_am_startup(Addr sp_at_startup ) ;
3673 extern NSegment const   *vgPlain_am_next_nsegment(NSegment *here , Bool fwds ) ;   3673 extern NSegment const   *vgPlain_am_next_nsegment(NSegment *here , Bool fwds ) ;
3674 extern Bool vgPlain_am_is_valid_for_client_or_free_or_resvn(Addr start ,   3674 extern Bool vgPlain_am_is_valid_for_client_or_free_or_resvn(Addr start ,
3675                                                             SizeT len ,   3675                                                             SizeT len ,
3676                                                             UInt prot ) ;   3676                                                             UInt prot ) ;
3677 extern ULong vgPlain_am_get_anonsize_total(void) ;   3677 extern ULong vgPlain_am_get_anonsize_total(void) ;
3678 extern void vgPlain_am_show_nsegments(Int logLevel , HChar *who ) ;   3678 extern void vgPlain_am_show_nsegments(Int logLevel , HChar *who ) ;
3679 extern Bool vgPlain_am_do_sync_check(HChar const   *fn , HChar const   *file ,   3679 extern Bool vgPlain_am_do_sync_check(HChar const   *fn , HChar const   *file ,
3680                                      Int line ) ;   3680                                      Int line ) ;
3681 extern Addr vgPlain_am_get_advisory(MapRequest *req , Bool forClient , Bool *ok ) ;   3681 extern Addr vgPlain_am_get_advisory(MapRequest *req , Bool forClient , Bool *ok ) ;
3682 extern Addr vgPlain_am_get_advisory_client_simple(Addr start , SizeT len ,   3682 extern Addr vgPlain_am_get_advisory_client_simple(Addr start , SizeT len ,
3683                                                   Bool *ok ) ;   3683                                                   Bool *ok ) ;
3684 extern Bool vgPlain_am_notify_client_mmap(Addr a , SizeT len , UInt prot ,   3684 extern Bool vgPlain_am_notify_client_mmap(Addr a , SizeT len , UInt prot ,
3685                                           UInt flags , Int fd , Off64T offset ) ;   3685                                           UInt flags , Int fd , Off64T offset ) ;
3686 extern Bool vgPlain_am_notify_client_shmat(Addr a , SizeT len , UInt prot ) ;   3686 extern Bool vgPlain_am_notify_client_shmat(Addr a , SizeT len , UInt prot ) ;
3687 extern Bool vgPlain_am_notify_mprotect(Addr start , SizeT len , UInt prot ) ;   3687 extern Bool vgPlain_am_notify_mprotect(Addr start , SizeT len , UInt prot ) ;
3688 extern Bool vgPlain_am_notify_munmap(Addr start , SizeT len ) ;   3688 extern Bool vgPlain_am_notify_munmap(Addr start , SizeT len ) ;
3689 extern SysRes vgPlain_am_do_mmap_NO_NOTIFY(Addr start , SizeT length ,   3689 extern SysRes vgPlain_am_do_mmap_NO_NOTIFY(Addr start , SizeT length ,
3690                                            UInt prot , UInt flags , Int fd ,   3690                                            UInt prot , UInt flags , Int fd ,
3691                                            Off64T offset ) ;   3691                                            Off64T offset ) ;
3692 extern void vgPlain_am_aix5_reread_procmap(AixCodeSegChange *directives ,   3692 extern void vgPlain_am_aix5_reread_procmap(AixCodeSegChange *directives ,
3693                                            Int *ndirectives ) ;   3693                                            Int *ndirectives ) ;
3694 extern Int vgPlain_am_aix5_reread_procmap_howmany_directives(void) ;   3694 extern Int vgPlain_am_aix5_reread_procmap_howmany_directives(void) ;
3695 extern void vgPlain_am_aix5_set_initial_client_sp(Addr  ) ;   3695 extern void vgPlain_am_aix5_set_initial_client_sp(Addr  ) ;
3696 extern Bool vgPlain_am_aix5_sbrk_allowed ;   3696 extern Bool vgPlain_am_aix5_sbrk_allowed ;
3697 extern SysRes vgPlain_am_mmap_file_fixed_client(Addr start , SizeT length ,   3697 extern SysRes vgPlain_am_mmap_file_fixed_client(Addr start , SizeT length ,
3698                                                 UInt prot , Int fd ,   3698                                                 UInt prot , Int fd ,
3699                                                 Off64T offset ) ;   3699                                                 Off64T offset ) ;
3700 extern SysRes vgPlain_am_mmap_named_file_fixed_client(Addr start ,   3700 extern SysRes vgPlain_am_mmap_named_file_fixed_client(Addr start ,
3701                                                       SizeT length , UInt prot ,   3701                                                       SizeT length , UInt prot ,
3702                                                       Int fd , Off64T offset ,   3702                                                       Int fd , Off64T offset ,
3703                                                       HChar const   *name ) ;   3703                                                       HChar const   *name ) ;
3704 extern SysRes vgPlain_am_mmap_anon_fixed_client(Addr start , SizeT length ,   3704 extern SysRes vgPlain_am_mmap_anon_fixed_client(Addr start , SizeT length ,
3705                                                 UInt prot ) ;   3705                                                 UInt prot ) ;
3706 extern SysRes vgPlain_am_mmap_anon_float_client(SizeT length , Int prot ) ;   3706 extern SysRes vgPlain_am_mmap_anon_float_client(SizeT length , Int prot ) ;
3707 extern SysRes vgPlain_am_sbrk_anon_float_client(SizeT length , Int prot ) ;   3707 extern SysRes vgPlain_am_sbrk_anon_float_client(SizeT length , Int prot ) ;
3708 extern SysRes vgPlain_am_mmap_anon_float_valgrind(SizeT cszB ) ;   3708 extern SysRes vgPlain_am_mmap_anon_float_valgrind(SizeT cszB ) ;
3709 extern SysRes vgPlain_am_sbrk_anon_float_valgrind(SizeT cszB ) ;   3709 extern SysRes vgPlain_am_sbrk_anon_float_valgrind(SizeT cszB ) ;
3710 extern SysRes vgPlain_am_mmap_file_float_valgrind(SizeT length , UInt prot ,   3710 extern SysRes vgPlain_am_mmap_file_float_valgrind(SizeT length , UInt prot ,
3711                                                   Int fd , Off64T offset ) ;   3711                                                   Int fd , Off64T offset ) ;
3712 extern SysRes vgPlain_am_shared_mmap_file_float_valgrind(SizeT length ,   3712 extern SysRes vgPlain_am_shared_mmap_file_float_valgrind(SizeT length ,
3713                                                          UInt prot , Int fd ,   3713                                                          UInt prot , Int fd ,
3714                                                          Off64T offset ) ;   3714                                                          Off64T offset ) ;
3715 extern SysRes vgPlain_am_munmap_client(Bool *need_discard , Addr start ,   3715 extern SysRes vgPlain_am_munmap_client(Bool *need_discard , Addr start ,
3716                                        SizeT length ) ;   3716                                        SizeT length ) ;
3717 extern Bool vgPlain_am_change_ownership_v_to_c(Addr start , SizeT len ) ;   3717 extern Bool vgPlain_am_change_ownership_v_to_c(Addr start , SizeT len ) ;
3718 extern void vgPlain_am_set_segment_isCH_if_SkAnonC(NSegment *seg ) ;   3718 extern void vgPlain_am_set_segment_isCH_if_SkAnonC(NSegment *seg ) ;
3719 extern void vgPlain_am_set_segment_hasT_if_SkFileC_or_SkAnonC(NSegment * ) ;   3719 extern void vgPlain_am_set_segment_hasT_if_SkFileC_or_SkAnonC(NSegment * ) ;
3720 extern Bool vgPlain_am_create_reservation(Addr start , SizeT length ,   3720 extern Bool vgPlain_am_create_reservation(Addr start , SizeT length ,
3721                                           ShrinkMode smode , SSizeT extra ) ;   3721                                           ShrinkMode smode , SSizeT extra ) ;
3722 extern Bool vgPlain_am_extend_into_adjacent_reservation_client(NSegment *seg ,   3722 extern Bool vgPlain_am_extend_into_adjacent_reservation_client(NSegment *seg ,
3723                                                                SSizeT delta ) ;   3723                                                                SSizeT delta ) ;
3724 extern Bool vgPlain_am_extend_map_client(Bool *need_discard , NSegment *seg ,   3724 extern Bool vgPlain_am_extend_map_client(Bool *need_discard , NSegment *seg ,
3725                                          SizeT delta ) ;   3725                                          SizeT delta ) ;
3726 extern Bool vgPlain_am_relocate_nooverlap_client(Bool *need_discard ,   3726 extern Bool vgPlain_am_relocate_nooverlap_client(Bool *need_discard ,
3727                                                  Addr old_addr , SizeT old_len ,   3727                                                  Addr old_addr , SizeT old_len ,
3728                                                  Addr new_addr , SizeT new_len ) ;   3728                                                  Addr new_addr , SizeT new_len ) ;
3729 extern VgStack *vgPlain_am_alloc_VgStack(Addr *initial_sp ) ;   3729 extern VgStack *vgPlain_am_alloc_VgStack(Addr *initial_sp ) ;
3730 extern SizeT vgPlain_am_get_VgStack_unused_szB(VgStack *stack , SizeT limit ) ;   3730 extern SizeT vgPlain_am_get_VgStack_unused_szB(VgStack *stack , SizeT limit ) ;
3731 static int ( /* format attribute */  VALGRIND_PRINTF)(char const   *format   3731 static int ( /* format attribute */  VALGRIND_PRINTF)(char const   *format
3732                                                       , ...)  __attribute__((__unused__)) ;   3732                                                       , ...)  __attribute__((__unused__)) ;
3733 static int ( /* format attribute */  VALGRIND_PRINTF)(char const   *format   3733 static int ( /* format attribute */  VALGRIND_PRINTF)(char const   *format
3734                                                       , ...)  __attribute__((__unused__)) ;   3734                                                       , ...)  __attribute__((__unused__)) ;
3735 static int ( /* format attribute */  VALGRIND_PRINTF)(char const   *format   3735 static int ( /* format attribute */  VALGRIND_PRINTF)(char const   *format
3736                                                       , ...)   3736                                                       , ...)
3737 {   3737 {
3738   unsigned long _qzz_res ;   3738   unsigned long _qzz_res ;
3739   va_list vargs ;   3739   va_list vargs ;
3740   unsigned int volatile   _zzq_args[6] ;   3740   unsigned int volatile   _zzq_args[6] ;
3741   unsigned int volatile   _zzq_result ;   3741   unsigned int volatile   _zzq_result ;
3742     3742  
3743   {   3743   {
3744   __builtin_va_start(vargs, format);   3744   __builtin_va_start(vargs, format);
3745   _zzq_args[0] = (unsigned int volatile   )5123U;   3745   _zzq_args[0] = (unsigned int volatile   )5123U;
3746   _zzq_args[1] = (unsigned int volatile   )((unsigned int )((unsigned long )format));   3746   _zzq_args[1] = (unsigned int volatile   )((unsigned int )((unsigned long )format));
3747   _zzq_args[2] = (unsigned int volatile   )((unsigned int )((unsigned long )(& vargs)));   3747   _zzq_args[2] = (unsigned int volatile   )((unsigned int )((unsigned long )(& vargs)));
3748   _zzq_args[3] = (unsigned int volatile   )0U;   3748   _zzq_args[3] = (unsigned int volatile   )0U;
3749   _zzq_args[4] = (unsigned int volatile   )0U;   3749   _zzq_args[4] = (unsigned int volatile   )0U;
3750   _zzq_args[5] = (unsigned int volatile   )0U;   3750   _zzq_args[5] = (unsigned int volatile   )0U;
3751   __asm__  volatile   ("roll $3,  %%edi ; roll $13, %%edi\n\t"   3751   __asm__  volatile   ("roll $3,  %%edi ; roll $13, %%edi\n\t"
3752                        "roll $29, %%edi ; roll $19, %%edi\n\t"   3752                        "roll $29, %%edi ; roll $19, %%edi\n\t"
3753                        "xchgl %%ebx,%%ebx": "=d" (_zzq_result): "a" (& _zzq_args[0]),   3753                        "xchgl %%ebx,%%ebx": "=d" (_zzq_result): "a" (& _zzq_args[0]),
3754                        "0" (0): "cc", "memory");   3754                        "0" (0): "cc", "memory");
3755   _qzz_res = (unsigned long )_zzq_result;   3755   _qzz_res = (unsigned long )_zzq_result;
3756   __builtin_va_end(vargs);   3756   __builtin_va_end(vargs);
3757   return ((int )_qzz_res);   3757   return ((int )_qzz_res);
3758 }   3758 }
3759 }   3759 }
3760 static int ( /* format attribute */  VALGRIND_PRINTF_BACKTRACE)(char const   *format   3760 static int ( /* format attribute */  VALGRIND_PRINTF_BACKTRACE)(char const   *format
3761                                                                 , ...)  __attribute__((__unused__)) ;   3761                                                                 , ...)  __attribute__((__unused__)) ;
3762 static int ( /* format attribute */  VALGRIND_PRINTF_BACKTRACE)(char const   *format   3762 static int ( /* format attribute */  VALGRIND_PRINTF_BACKTRACE)(char const   *format
3763                                                                 , ...)  __attribute__((__unused__)) ;   3763                                                                 , ...)  __attribute__((__unused__)) ;
3764 static int ( /* format attribute */  VALGRIND_PRINTF_BACKTRACE)(char const   *format   3764 static int ( /* format attribute */  VALGRIND_PRINTF_BACKTRACE)(char const   *format
3765                                                                 , ...)   3765                                                                 , ...)
3766 {   3766 {
3767   unsigned long _qzz_res ;   3767   unsigned long _qzz_res ;
3768   va_list vargs ;   3768   va_list vargs ;
3769   unsigned int volatile   _zzq_args[6] ;   3769   unsigned int volatile   _zzq_args[6] ;
3770   unsigned int volatile   _zzq_result ;   3770   unsigned int volatile   _zzq_result ;
3771     3771  
3772   {   3772   {
3773   __builtin_va_start(vargs, format);   3773   __builtin_va_start(vargs, format);
3774   _zzq_args[0] = (unsigned int volatile   )5124U;   3774   _zzq_args[0] = (unsigned int volatile   )5124U;
3775   _zzq_args[1] = (unsigned int volatile   )((unsigned int )((unsigned long )format));   3775   _zzq_args[1] = (unsigned int volatile   )((unsigned int )((unsigned long )format));
3776   _zzq_args[2] = (unsigned int volatile   )((unsigned int )((unsigned long )(& vargs)));   3776   _zzq_args[2] = (unsigned int volatile   )((unsigned int )((unsigned long )(& vargs)));
3777   _zzq_args[3] = (unsigned int volatile   )0U;   3777   _zzq_args[3] = (unsigned int volatile   )0U;
3778   _zzq_args[4] = (unsigned int volatile   )0U;   3778   _zzq_args[4] = (unsigned int volatile   )0U;
3779   _zzq_args[5] = (unsigned int volatile   )0U;   3779   _zzq_args[5] = (unsigned int volatile   )0U;
3780   __asm__  volatile   ("roll $3,  %%edi ; roll $13, %%edi\n\t"   3780   __asm__  volatile   ("roll $3,  %%edi ; roll $13, %%edi\n\t"
3781                        "roll $29, %%edi ; roll $19, %%edi\n\t"   3781                        "roll $29, %%edi ; roll $19, %%edi\n\t"
3782                        "xchgl %%ebx,%%ebx": "=d" (_zzq_result): "a" (& _zzq_args[0]),   3782                        "xchgl %%ebx,%%ebx": "=d" (_zzq_result): "a" (& _zzq_args[0]),
3783                        "0" (0): "cc", "memory");   3783                        "0" (0): "cc", "memory");
3784   _qzz_res = (unsigned long )_zzq_result;   3784   _qzz_res = (unsigned long )_zzq_result;
3785   __builtin_va_end(vargs);   3785   __builtin_va_end(vargs);
3786   return ((int )_qzz_res);   3786   return ((int )_qzz_res);
3787 }   3787 }
3788 }   3788 }
3789 static int ( /* format attribute */  VALGRIND_INTERNAL_PRINTF)(char const   *format   3789 static int ( /* format attribute */  VALGRIND_INTERNAL_PRINTF)(char const   *format
3790                                                                , ...)  __attribute__((__unused__)) ;   3790                                                                , ...)  __attribute__((__unused__)) ;
3791 static int ( /* format attribute */  VALGRIND_INTERNAL_PRINTF)(char const   *format   3791 static int ( /* format attribute */  VALGRIND_INTERNAL_PRINTF)(char const   *format
3792                                                                , ...)  __attribute__((__unused__)) ;   3792                                                                , ...)  __attribute__((__unused__)) ;
3793 static int ( /* format attribute */  VALGRIND_INTERNAL_PRINTF)(char const   *format   3793 static int ( /* format attribute */  VALGRIND_INTERNAL_PRINTF)(char const   *format
3794                                                                , ...)   3794                                                                , ...)
3795 {   3795 {
3796   unsigned long _qzz_res ;   3796   unsigned long _qzz_res ;
3797   va_list vargs ;   3797   va_list vargs ;
3798   unsigned int volatile   _zzq_args[6] ;   3798   unsigned int volatile   _zzq_args[6] ;
3799   unsigned int volatile   _zzq_result ;   3799   unsigned int volatile   _zzq_result ;
3800     3800  
3801   {   3801   {
3802   _qzz_res = 0UL;   3802   _qzz_res = 0UL;
3803   __builtin_va_start(vargs, format);   3803   __builtin_va_start(vargs, format);
3804   _zzq_args[0] = (unsigned int volatile   )12547U;   3804   _zzq_args[0] = (unsigned int volatile   )12547U;
3805   _zzq_args[1] = (unsigned int volatile   )((unsigned int )((unsigned long )format));   3805   _zzq_args[1] = (unsigned int volatile   )((unsigned int )((unsigned long )format));
3806   _zzq_args[2] = (unsigned int volatile   )((unsigned int )((unsigned long )(& vargs)));   3806   _zzq_args[2] = (unsigned int volatile   )((unsigned int )((unsigned long )(& vargs)));
3807   _zzq_args[3] = (unsigned int volatile   )0U;   3807   _zzq_args[3] = (unsigned int volatile   )0U;
3808   _zzq_args[4] = (unsigned int volatile   )0U;   3808   _zzq_args[4] = (unsigned int volatile   )0U;
3809   _zzq_args[5] = (unsigned int volatile   )0U;   3809   _zzq_args[5] = (unsigned int volatile   )0U;
3810   __asm__  volatile   ("roll $3,  %%edi ; roll $13, %%edi\n\t"   3810   __asm__  volatile   ("roll $3,  %%edi ; roll $13, %%edi\n\t"
3811                        "roll $29, %%edi ; roll $19, %%edi\n\t"   3811                        "roll $29, %%edi ; roll $19, %%edi\n\t"
3812                        "xchgl %%ebx,%%ebx": "=d" (_zzq_result): "a" (& _zzq_args[0]),   3812                        "xchgl %%ebx,%%ebx": "=d" (_zzq_result): "a" (& _zzq_args[0]),
3813                        "0" (0): "cc", "memory");   3813                        "0" (0): "cc", "memory");
3814   _qzz_res = (unsigned long )_zzq_result;   3814   _qzz_res = (unsigned long )_zzq_result;
3815   __builtin_va_end(vargs);   3815   __builtin_va_end(vargs);
3816   return ((int )_qzz_res);   3816   return ((int )_qzz_res);
3817 }   3817 }
3818 }   3818 }
3819 extern UWord vgPlain_run_innerloop(void *guest_state , UWord do_profiling ) ;   3819 extern UWord vgPlain_run_innerloop(void *guest_state , UWord do_profiling ) ;
3820 extern Addr vgPlain_run_innerloop__dispatch_unprofiled ;   3820 extern Addr vgPlain_run_innerloop__dispatch_unprofiled ;
3821 extern Addr vgPlain_run_innerloop__dispatch_profiled ;   3821 extern Addr vgPlain_run_innerloop__dispatch_profiled ;
3822 extern void vgPlain_run_a_noredir_translation(UWord volatile   *argblock ) ;   3822 extern void vgPlain_run_a_noredir_translation(UWord volatile   *argblock ) ;
3823 extern Addr vgPlain_run_a_noredir_translation__return_point ;   3823 extern Addr vgPlain_run_a_noredir_translation__return_point ;
3824 extern ExeContext *vgPlain_record_ExeContext(ThreadId tid , Word first_ip_delta ) ;   3824 extern ExeContext *vgPlain_record_ExeContext(ThreadId tid , Word first_ip_delta ) ;
3825 extern ExeContext *vgPlain_record_depth_1_ExeContext(ThreadId tid ) ;   3825 extern ExeContext *vgPlain_record_depth_1_ExeContext(ThreadId tid ) ;
3826 extern void vgPlain_apply_ExeContext(void (*action)(UInt n , Addr ip ) ,   3826 extern void vgPlain_apply_ExeContext(void (*action)(UInt n , Addr ip ) ,
3827                                      ExeContext *ec , UInt n_ips ) ;   3827                                      ExeContext *ec , UInt n_ips ) ;
3828 extern Bool vgPlain_eq_ExeContext(VgRes res , ExeContext *e1 , ExeContext *e2 ) ;   3828 extern Bool vgPlain_eq_ExeContext(VgRes res , ExeContext *e1 , ExeContext *e2 ) ;
3829 extern void vgPlain_pp_ExeContext(ExeContext *ec ) ;   3829 extern void vgPlain_pp_ExeContext(ExeContext *ec ) ;
3830 extern UInt vgPlain_get_ECU_from_ExeContext(ExeContext *e ) ;   3830 extern UInt vgPlain_get_ECU_from_ExeContext(ExeContext *e ) ;
3831 extern Int vgPlain_get_ExeContext_n_ips(ExeContext *e ) ;   3831 extern Int vgPlain_get_ExeContext_n_ips(ExeContext *e ) ;
3832 extern ExeContext *vgPlain_get_ExeContext_from_ECU(UInt uniq ) ;   3832 extern ExeContext *vgPlain_get_ExeContext_from_ECU(UInt uniq ) ;
3833 extern ExeContext *vgPlain_make_depth_1_ExeContext_from_Addr(Addr a ) ;   3833 extern ExeContext *vgPlain_make_depth_1_ExeContext_from_Addr(Addr a ) ;
3834 __inline static Bool vgPlain_is_plausible_ECU(UInt ecu )   3834 __inline static Bool vgPlain_is_plausible_ECU(UInt ecu )
3835 {   3835 {
3836   int tmp ;   3836   int tmp ;
3837     3837  
3838   {   3838   {
3839   if (ecu > 0U) {   3839   if (ecu > 0U) {
3840     if ((ecu & 3U) == 0U) {   3840     if ((ecu & 3U) == 0U) {
3841       tmp = 1;   3841       tmp = 1;
3842     } else {   3842     } else {
3843       tmp = 0;   3843       tmp = 0;
3844     }   3844     }
3845   } else {   3845   } else {
3846     tmp = 0;   3846     tmp = 0;
3847   }   3847   }
3848   return ((Bool )tmp);   3848   return ((Bool )tmp);
3849 }   3849 }
3850 }   3850 }
3851 extern ExeContext *vgPlain_make_ExeContext_from_StackTrace(Addr *ips ,   3851 extern ExeContext *vgPlain_make_ExeContext_from_StackTrace(Addr *ips ,
3852                                                            UInt n_ips ) ;   3852                                                            UInt n_ips ) ;
3853 extern ExeContext *vgPlain_get_error_where(Error *err ) ;   3853 extern ExeContext *vgPlain_get_error_where(Error *err ) ;
3854 extern ErrorKind vgPlain_get_error_kind(Error *err ) ;   3854 extern ErrorKind vgPlain_get_error_kind(Error *err ) ;
3855 extern Addr vgPlain_get_error_address(Error *err ) ;   3855 extern Addr vgPlain_get_error_address(Error *err ) ;
3856 extern Char *vgPlain_get_error_string(Error *err ) ;   3856 extern Char *vgPlain_get_error_string(Error *err ) ;
3857 extern void *vgPlain_get_error_extra(Error *err ) ;   3857 extern void *vgPlain_get_error_extra(Error *err ) ;
3858 extern void vgPlain_maybe_record_error(ThreadId tid , ErrorKind ekind , Addr a ,   3858 extern void vgPlain_maybe_record_error(ThreadId tid , ErrorKind ekind , Addr a ,
3859                                        Char *s , void *extra ) ;   3859                                        Char *s , void *extra ) ;
3860 extern Bool vgPlain_unique_error(ThreadId tid , ErrorKind ekind , Addr a ,   3860 extern Bool vgPlain_unique_error(ThreadId tid , ErrorKind ekind , Addr a ,
3861                                  Char *s , void *extra , ExeContext *where ,   3861                                  Char *s , void *extra , ExeContext *where ,
3862                                  Bool print_error , Bool allow_GDB_attach ,   3862                                  Bool print_error , Bool allow_GDB_attach ,
3863                                  Bool count_error ) ;   3863                                  Bool count_error ) ;
3864 extern Bool vgPlain_get_line(Int fd , Char **bufpp , SizeT *nBufp , Int *lineno ) ;   3864 extern Bool vgPlain_get_line(Int fd , Char **bufpp , SizeT *nBufp , Int *lineno ) ;
3865 extern SuppKind vgPlain_get_supp_kind(Supp *su ) ;   3865 extern SuppKind vgPlain_get_supp_kind(Supp *su ) ;
3866 extern Char *vgPlain_get_supp_string(Supp *su ) ;   3866 extern Char *vgPlain_get_supp_string(Supp *su ) ;
3867 extern void *vgPlain_get_supp_extra(Supp *su ) ;   3867 extern void *vgPlain_get_supp_extra(Supp *su ) ;
3868 extern void vgPlain_set_supp_kind(Supp *su , SuppKind suppkind ) ;   3868 extern void vgPlain_set_supp_kind(Supp *su , SuppKind suppkind ) ;
3869 extern void vgPlain_set_supp_string(Supp *su , Char *string ) ;   3869 extern void vgPlain_set_supp_string(Supp *su , Char *string ) ;
3870 extern void vgPlain_set_supp_extra(Supp *su , void *extra ) ;   3870 extern void vgPlain_set_supp_extra(Supp *su , void *extra ) ;
3871 extern void vgPlain_load_suppressions(void) ;   3871 extern void vgPlain_load_suppressions(void) ;
3872 extern void vgPlain_show_all_errors(Int verbosity , Bool xml ) ;   3872 extern void vgPlain_show_all_errors(Int verbosity , Bool xml ) ;
3873 extern void vgPlain_show_last_error(void) ;   3873 extern void vgPlain_show_last_error(void) ;
3874 extern void vgPlain_show_error_counts_as_XML(void) ;   3874 extern void vgPlain_show_error_counts_as_XML(void) ;
3875 extern Bool vgPlain_is_action_requested(Char *action , Bool *clo ) ;   3875 extern Bool vgPlain_is_action_requested(Char *action , Bool *clo ) ;
3876 extern Bool vgPlain_showing_core_errors(void) ;   3876 extern Bool vgPlain_showing_core_errors(void) ;
3877 extern UInt vgPlain_get_n_errs_found(void) ;   3877 extern UInt vgPlain_get_n_errs_found(void) ;
3878 extern void vgPlain_print_errormgr_stats(void) ;   3878 extern void vgPlain_print_errormgr_stats(void) ;
3879 extern void vgPlain_gdbserver(ThreadId tid ) ;   3879 extern void vgPlain_gdbserver(ThreadId tid ) ;
3880 extern Int vgPlain_dyn_vgdb_error ;   3880 extern Int vgPlain_dyn_vgdb_error ;
3881 extern char *vgPlain_ppPointKind(PointKind kind ) ;   3881 extern char *vgPlain_ppPointKind(PointKind kind ) ;
3882 extern Bool vgPlain_is_watched(PointKind kind , Addr addr , Int szB ) ;   3882 extern Bool vgPlain_is_watched(PointKind kind , Addr addr , Int szB ) ;
3883 extern void vgPlain_needs_watchpoint(Bool (*watchpoint)(PointKind kind ,   3883 extern void vgPlain_needs_watchpoint(Bool (*watchpoint)(PointKind kind ,
3884                                                         Bool insert ,   3884                                                         Bool insert ,
3885                                                         Addr addr , SizeT len ) ) ;   3885                                                         Addr addr , SizeT len ) ) ;
3886 extern UInt ( /* format attribute */  vgPlain_gdb_printf)(HChar const   *format   3886 extern UInt ( /* format attribute */  vgPlain_gdb_printf)(HChar const   *format
3887                                                           , ...) ;   3887                                                           , ...) ;
3888 extern Int vgPlain_keyword_id(Char *keywords , Char *input_word ,   3888 extern Int vgPlain_keyword_id(Char *keywords , Char *input_word ,
3889                               kwd_report_error report ) ;   3889                               kwd_report_error report ) ;
3890 extern void vgPlain_strtok_get_address_and_size(Addr *address , SizeT *szB ,   3890 extern void vgPlain_strtok_get_address_and_size(Addr *address , SizeT *szB ,
3891                                                 Char **ssaveptr ) ;   3891                                                 Char **ssaveptr ) ;
3892 extern void vgPlain_gdbserver_prerun_action(ThreadId tid ) ;   3892 extern void vgPlain_gdbserver_prerun_action(ThreadId tid ) ;
3893 extern Bool vgPlain_gdbserver_activity(ThreadId tid ) ;   3893 extern Bool vgPlain_gdbserver_activity(ThreadId tid ) ;
3894 extern Bool vgPlain_gdbserver_point(PointKind kind , Bool insert , Addr addr ,   3894 extern Bool vgPlain_gdbserver_point(PointKind kind , Bool insert , Addr addr ,
3895                                     int len ) ;   3895                                     int len ) ;
3896 extern void vgPlain_invoke_gdbserver(int check ) ;   3896 extern void vgPlain_invoke_gdbserver(int check ) ;
3897 extern Bool vgPlain_gdbserver_report_signal(Int signo , ThreadId tid ) ;   3897 extern Bool vgPlain_gdbserver_report_signal(Int signo , ThreadId tid ) ;
3898 extern IRSB *vgPlain_instrument_for_gdbserver_if_needed(IRSB *sb_in ,   3898 extern IRSB *vgPlain_instrument_for_gdbserver_if_needed(IRSB *sb_in ,
3899                                                         VexGuestLayout *layout ,   3899                                                         VexGuestLayout *layout ,
3900                                                         VexGuestExtents *vge ,   3900                                                         VexGuestExtents *vge ,
3901                                                         IRType gWordTy ,   3901                                                         IRType gWordTy ,
3902                                                         IRType hWordTy ) ;   3902                                                         IRType hWordTy ) ;
3903 extern void vgPlain_gdbserver_status_output(void) ;   3903 extern void vgPlain_gdbserver_status_output(void) ;
3904 extern Bool vgPlain_isspace(Char c ) ;   3904 extern Bool vgPlain_isspace(Char c ) ;
3905 extern Bool vgPlain_isdigit(Char c ) ;   3905 extern Bool vgPlain_isdigit(Char c ) ;
3906 extern Char vgPlain_tolower(Char c ) ;   3906 extern Char vgPlain_tolower(Char c ) ;
3907 extern Long vgPlain_strtoll10(Char *str , Char **endptr ) ;   3907 extern Long vgPlain_strtoll10(Char *str , Char **endptr ) ;
3908 extern Long vgPlain_strtoll16(Char *str , Char **endptr ) ;   3908 extern Long vgPlain_strtoll16(Char *str , Char **endptr ) ;
3909 extern ULong vgPlain_strtoull10(Char *str , Char **endptr ) ;   3909 extern ULong vgPlain_strtoull10(Char *str , Char **endptr ) ;
3910 extern ULong vgPlain_strtoull16(Char *str , Char **endptr ) ;   3910 extern ULong vgPlain_strtoull16(Char *str , Char **endptr ) ;
3911 extern double vgPlain_strtod(Char *str , Char **endptr ) ;   3911 extern double vgPlain_strtod(Char *str , Char **endptr ) ;
3912 extern SizeT vgPlain_strlen(Char const   *str ) ;   3912 extern SizeT vgPlain_strlen(Char const   *str ) ;
3913 extern Char *vgPlain_strcat(Char *dest , Char const   *src ) ;   3913 extern Char *vgPlain_strcat(Char *dest , Char const   *src ) ;
3914 extern Char *vgPlain_strncat(Char *dest , Char const   *src , SizeT n ) ;   3914 extern Char *vgPlain_strncat(Char *dest , Char const   *src , SizeT n ) ;
3915 extern Char *vgPlain_strpbrk(Char const   *s , Char const   *accpt ) ;   3915 extern Char *vgPlain_strpbrk(Char const   *s , Char const   *accpt ) ;
3916 extern Char *vgPlain_strcpy(Char *dest , Char const   *src ) ;   3916 extern Char *vgPlain_strcpy(Char *dest , Char const   *src ) ;
3917 extern Char *vgPlain_strncpy(Char *dest , Char const   *src , SizeT ndest ) ;   3917 extern Char *vgPlain_strncpy(Char *dest , Char const   *src , SizeT ndest ) ;
3918 extern Int vgPlain_strcmp(Char const   *s1 , Char const   *s2 ) ;   3918 extern Int vgPlain_strcmp(Char const   *s1 , Char const   *s2 ) ;
3919 extern Int vgPlain_strcasecmp(Char const   *s1 , Char const   *s2 ) ;   3919 extern Int vgPlain_strcasecmp(Char const   *s1 , Char const   *s2 ) ;
3920 extern Int vgPlain_strncmp(Char const   *s1 , Char const   *s2 , SizeT nmax ) ;   3920 extern Int vgPlain_strncmp(Char const   *s1 , Char const   *s2 , SizeT nmax ) ;
3921 extern Int vgPlain_strncasecmp(Char const   *s1 , Char const   *s2 , SizeT nmax ) ;   3921 extern Int vgPlain_strncasecmp(Char const   *s1 , Char const   *s2 , SizeT nmax ) ;
3922 extern Char *vgPlain_strstr(Char const   *haystack , Char *needle ) ;   3922 extern Char *vgPlain_strstr(Char const   *haystack , Char *needle ) ;
3923 extern Char *vgPlain_strcasestr(Char const   *haystack , Char *needle ) ;   3923 extern Char *vgPlain_strcasestr(Char const   *haystack , Char *needle ) ;
3924 extern Char *vgPlain_strchr(Char const   *s , Char c ) ;   3924 extern Char *vgPlain_strchr(Char const   *s , Char c ) ;
3925 extern Char *vgPlain_strrchr(Char const   *s , Char c ) ;   3925 extern Char *vgPlain_strrchr(Char const   *s , Char c ) ;
3926 extern SizeT vgPlain_strspn(Char const   *s , Char const   *accpt ) ;   3926 extern SizeT vgPlain_strspn(Char const   *s , Char const   *accpt ) ;
3927 extern SizeT vgPlain_strcspn(Char const   *s , char const   *reject ) ;   3927 extern SizeT vgPlain_strcspn(Char const   *s , char const   *reject ) ;
3928 extern Char *vgPlain_strtok_r(Char *s , Char const   *delim , Char **saveptr ) ;   3928 extern Char *vgPlain_strtok_r(Char *s , Char const   *delim , Char **saveptr ) ;
3929 extern Char *vgPlain_strtok(Char *s , Char const   *delim ) ;   3929 extern Char *vgPlain_strtok(Char *s , Char const   *delim ) ;
3930 extern Bool vgPlain_parse_Addr(UChar **ppc , Addr *result ) ;   3930 extern Bool vgPlain_parse_Addr(UChar **ppc , Addr *result ) ;
3931 extern void vgPlain_strncpy_safely(Char *dest , Char const   *src , SizeT ndest ) ;   3931 extern void vgPlain_strncpy_safely(Char *dest , Char const   *src , SizeT ndest ) ;
3932 extern void *vgPlain_memcpy(void *d , void const   *s , SizeT sz ) ;   3932 extern void *vgPlain_memcpy(void *d , void const   *s , SizeT sz ) ;
3933 extern void *vgPlain_memmove(void *d , void const   *s , SizeT sz ) ;   3933 extern void *vgPlain_memmove(void *d , void const   *s , SizeT sz ) ;
3934 extern void *vgPlain_memset(void *s , Int c , SizeT sz ) ;   3934 extern void *vgPlain_memset(void *s , Int c , SizeT sz ) ;
3935 extern Int vgPlain_memcmp(void const   *s1 , void const   *s2 , SizeT n ) ;   3935 extern Int vgPlain_memcmp(void const   *s1 , void const   *s2 , SizeT n ) ;
3936 __inline static void ( __attribute__((__always_inline__)) vgPlain_bzero_inline)(void *s ,   3936 __inline static void ( __attribute__((__always_inline__)) vgPlain_bzero_inline)(void *s ,
3937                                                                                 SizeT sz )   3937                                                                                 SizeT sz )
3938 {   3938 {
3939   UWord *p ;   3939   UWord *p ;
3940   UWord tmp ;   3940   UWord tmp ;
3941   UWord tmp___0 ;   3941   UWord tmp___0 ;
3942   UWord tmp___1 ;   3942   UWord tmp___1 ;
3943   UWord tmp___2 ;   3943   UWord tmp___2 ;
3944   UWord tmp___3 ;   3944   UWord tmp___3 ;
3945   UWord tmp___4 ;   3945   UWord tmp___4 ;
3946   UWord tmp___5 ;   3946   UWord tmp___5 ;
3947   UWord tmp___6 ;   3947   UWord tmp___6 ;
3948   UWord tmp___7 ;   3948   UWord tmp___7 ;
3949   UWord tmp___8 ;   3949   UWord tmp___8 ;
3950   UWord tmp___9 ;   3950   UWord tmp___9 ;
3951   UWord tmp___10 ;   3951   UWord tmp___10 ;
3952   UWord tmp___11 ;   3952   UWord tmp___11 ;
3953   UWord tmp___12 ;   3953   UWord tmp___12 ;
3954   UWord tmp___13 ;   3954   UWord tmp___13 ;
3955   UWord tmp___14 ;   3955   UWord tmp___14 ;
3956   UWord tmp___15 ;   3956   UWord tmp___15 ;
3957   UWord tmp___16 ;   3957   UWord tmp___16 ;
3958   UWord tmp___17 ;   3958   UWord tmp___17 ;
3959   UWord tmp___18 ;   3959   UWord tmp___18 ;
3960   UWord tmp___19 ;   3960   UWord tmp___19 ;
3961   UWord tmp___20 ;   3961   UWord tmp___20 ;
3962   UWord tmp___21 ;   3962   UWord tmp___21 ;
3963   UWord tmp___22 ;   3963   UWord tmp___22 ;
3964   UWord tmp___23 ;   3964   UWord tmp___23 ;
3965   UWord tmp___24 ;   3965   UWord tmp___24 ;
3966   UWord tmp___25 ;   3966   UWord tmp___25 ;
3967   UWord tmp___26 ;   3967   UWord tmp___26 ;
3968   long tmp___27 ;   3968   long tmp___27 ;
3969   long tmp___28 ;   3969   long tmp___28 ;
3970     3970  
3971   {   3971   {
3972   tmp___27 = __builtin_expect((long )(! (! (0UL == (sz & (Addr )(sizeof(UWord ) - 1U))))),   3972   tmp___27 = __builtin_expect((long )(! (! (0UL == (sz & (Addr )(sizeof(UWord ) - 1U))))),
3973                               1L);   3973                               1L);
3974   if (tmp___27) {   3974   if (tmp___27) {
3975     tmp___28 = __builtin_expect((long )(! (! (0UL == ((Addr )s & (Addr )(sizeof(UWord ) - 1U))))),   3975     tmp___28 = __builtin_expect((long )(! (! (0UL == ((Addr )s & (Addr )(sizeof(UWord ) - 1U))))),
3976                                 1L);   3976                                 1L);
3977     if (tmp___28) {   3977     if (tmp___28) {
3978       p = (UWord *)s;   3978       p = (UWord *)s;
3979       switch (sz / (SizeT )sizeof(UWord )) {   3979       switch (sz / (SizeT )sizeof(UWord )) {
3980       case 8UL:   3980       case 8UL:
3981       tmp___5 = 0UL;   3981       tmp___5 = 0UL;
3982       *(p + 7) = tmp___5;   3982       *(p + 7) = tmp___5;
3983       tmp___4 = tmp___5;   3983       tmp___4 = tmp___5;
3984       *(p + 6) = tmp___4;   3984       *(p + 6) = tmp___4;
3985       tmp___3 = tmp___4;   3985       tmp___3 = tmp___4;
3986       *(p + 5) = tmp___3;   3986       *(p + 5) = tmp___3;
3987       tmp___2 = tmp___3;   3987       tmp___2 = tmp___3;
3988       *(p + 4) = tmp___2;   3988       *(p + 4) = tmp___2;
3989       tmp___1 = tmp___2;   3989       tmp___1 = tmp___2;
3990       *(p + 3) = tmp___1;   3990       *(p + 3) = tmp___1;
3991       tmp___0 = tmp___1;   3991       tmp___0 = tmp___1;
3992       *(p + 2) = tmp___0;   3992       *(p + 2) = tmp___0;
3993       tmp = tmp___0;   3993       tmp = tmp___0;
3994       *(p + 1) = tmp;   3994       *(p + 1) = tmp;
3995       *(p + 0) = tmp;   3995       *(p + 0) = tmp;
3996       return;   3996       return;
3997       case 7UL:   3997       case 7UL:
3998       tmp___11 = 0UL;   3998       tmp___11 = 0UL;
3999       *(p + 6) = tmp___11;   3999       *(p + 6) = tmp___11;
4000       tmp___10 = tmp___11;   4000       tmp___10 = tmp___11;
4001       *(p + 5) = tmp___10;   4001       *(p + 5) = tmp___10;
4002       tmp___9 = tmp___10;   4002       tmp___9 = tmp___10;
4003       *(p + 4) = tmp___9;   4003       *(p + 4) = tmp___9;
4004       tmp___8 = tmp___9;   4004       tmp___8 = tmp___9;
4005       *(p + 3) = tmp___8;   4005       *(p + 3) = tmp___8;
4006       tmp___7 = tmp___8;   4006       tmp___7 = tmp___8;
4007       *(p + 2) = tmp___7;   4007       *(p + 2) = tmp___7;
4008       tmp___6 = tmp___7;   4008       tmp___6 = tmp___7;
4009       *(p + 1) = tmp___6;   4009       *(p + 1) = tmp___6;
4010       *(p + 0) = tmp___6;   4010       *(p + 0) = tmp___6;
4011       return;   4011       return;
4012       case 6UL:   4012       case 6UL:
4013       tmp___16 = 0UL;   4013       tmp___16 = 0UL;
4014       *(p + 5) = tmp___16;   4014       *(p + 5) = tmp___16;
4015       tmp___15 = tmp___16;   4015       tmp___15 = tmp___16;
4016       *(p + 4) = tmp___15;   4016       *(p + 4) = tmp___15;
4017       tmp___14 = tmp___15;   4017       tmp___14 = tmp___15;
4018       *(p + 3) = tmp___14;   4018       *(p + 3) = tmp___14;
4019       tmp___13 = tmp___14;   4019       tmp___13 = tmp___14;
4020       *(p + 2) = tmp___13;   4020       *(p + 2) = tmp___13;
4021       tmp___12 = tmp___13;   4021       tmp___12 = tmp___13;
4022       *(p + 1) = tmp___12;   4022       *(p + 1) = tmp___12;
4023       *(p + 0) = tmp___12;   4023       *(p + 0) = tmp___12;
4024       return;   4024       return;
4025       case 5UL:   4025       case 5UL:
4026       tmp___20 = 0UL;   4026       tmp___20 = 0UL;
4027       *(p + 4) = tmp___20;   4027       *(p + 4) = tmp___20;
4028       tmp___19 = tmp___20;   4028       tmp___19 = tmp___20;
4029       *(p + 3) = tmp___19;   4029       *(p + 3) = tmp___19;
4030       tmp___18 = tmp___19;   4030       tmp___18 = tmp___19;
4031       *(p + 2) = tmp___18;   4031       *(p + 2) = tmp___18;
4032       tmp___17 = tmp___18;   4032       tmp___17 = tmp___18;
4033       *(p + 1) = tmp___17;   4033       *(p + 1) = tmp___17;
4034       *(p + 0) = tmp___17;   4034       *(p + 0) = tmp___17;
4035       return;   4035       return;
4036       case 4UL:   4036       case 4UL:
4037       tmp___23 = 0UL;   4037       tmp___23 = 0UL;
4038       *(p + 3) = tmp___23;   4038       *(p + 3) = tmp___23;
4039       tmp___22 = tmp___23;   4039       tmp___22 = tmp___23;
4040       *(p + 2) = tmp___22;   4040       *(p + 2) = tmp___22;
4041       tmp___21 = tmp___22;   4041       tmp___21 = tmp___22;
4042       *(p + 1) = tmp___21;   4042       *(p + 1) = tmp___21;
4043       *(p + 0) = tmp___21;   4043       *(p + 0) = tmp___21;
4044       return;   4044       return;
4045       case 3UL:   4045       case 3UL:
4046       tmp___25 = 0UL;   4046       tmp___25 = 0UL;
4047       *(p + 2) = tmp___25;   4047       *(p + 2) = tmp___25;
4048       tmp___24 = tmp___25;   4048       tmp___24 = tmp___25;
4049       *(p + 1) = tmp___24;   4049       *(p + 1) = tmp___24;
4050       *(p + 0) = tmp___24;   4050       *(p + 0) = tmp___24;
4051       return;   4051       return;
4052       case 2UL:   4052       case 2UL:
4053       tmp___26 = 0UL;   4053       tmp___26 = 0UL;
4054       *(p + 1) = tmp___26;   4054       *(p + 1) = tmp___26;
4055       *(p + 0) = tmp___26;   4055       *(p + 0) = tmp___26;
4056       return;   4056       return;
4057       case 1UL:   4057       case 1UL:
4058       *(p + 0) = 0UL;   4058       *(p + 0) = 0UL;
4059       return;   4059       return;
4060       case 0UL:   4060       case 0UL:
4061       return;   4061       return;
4062       default:   4062       default:
4063       break;   4063       break;
4064       }   4064       }
4065     } else {   4065     } else {
4066     4066  
4067     }   4067     }
4068   } else {   4068   } else {
4069     4069  
4070   }   4070   }
4071   vgPlain_memset(s, 0, sz);   4071   vgPlain_memset(s, 0, sz);
4072   return;   4072   return;
4073 }   4073 }
4074 }   4074 }
4075 extern void vgPlain_ssort(void *base , SizeT nmemb , SizeT size ,   4075 extern void vgPlain_ssort(void *base , SizeT nmemb , SizeT size ,
4076                           Int (*compar)(void * , void * ) ) ;   4076                           Int (*compar)(void * , void * ) ) ;
4077 extern Int vgPlain_log2(UInt x ) ;   4077 extern Int vgPlain_log2(UInt x ) ;
4078 extern UInt vgPlain_random(UInt *pSeed ) ;   4078 extern UInt vgPlain_random(UInt *pSeed ) ;
4079 extern  __attribute__((__noreturn__)) void vgPlain_exit(Int status ) ;   4079 extern  __attribute__((__noreturn__)) void vgPlain_exit(Int status ) ;
4080 extern  __attribute__((__noreturn__)) void vgPlain_tool_panic(Char *str ) ;   4080 extern  __attribute__((__noreturn__)) void vgPlain_tool_panic(Char *str ) ;
4081 extern  __attribute__((__noreturn__)) void vgPlain_assert_fail(Bool isCore ,   4081 extern  __attribute__((__noreturn__)) void vgPlain_assert_fail(Bool isCore ,
4082                                                                Char const   *expr ,   4082                                                                Char const   *expr ,
4083                                                                Char const   *file ,   4083                                                                Char const   *file ,
4084                                                                Int line ,   4084                                                                Int line ,
4085                                                                Char const   *fn ,   4085                                                                Char const   *fn ,
4086                                                                HChar const   *format   4086                                                                HChar const   *format
4087                                                                , ...) ;   4087                                                                , ...) ;
4088 extern  __attribute__((__noreturn__)) void vgPlain_core_panic(Char *str ) ;   4088 extern  __attribute__((__noreturn__)) void vgPlain_core_panic(Char *str ) ;
4089 extern  __attribute__((__noreturn__)) void vgPlain_core_panic_at(Char *str ,   4089 extern  __attribute__((__noreturn__)) void vgPlain_core_panic_at(Char *str ,
4090                                                                  UnwindStartRegs * ) ;   4090                                                                  UnwindStartRegs * ) ;
4091 extern  __attribute__((__noreturn__)) void vgPlain_unimplemented(Char *msg ) ;   4091 extern  __attribute__((__noreturn__)) void vgPlain_unimplemented(Char *msg ) ;
4092 extern void vgPlain_show_sched_status(void) ;   4092 extern void vgPlain_show_sched_status(void) ;
4093 extern UInt ( /* format attribute */  vgPlain_sprintf)(Char *buf ,   4093 extern UInt ( /* format attribute */  vgPlain_sprintf)(Char *buf ,
4094                                                        HChar const   *format   4094                                                        HChar const   *format
4095                                                        , ...) ;   4095                                                        , ...) ;
4096 extern UInt ( /* format attribute */  vgPlain_vsprintf)(Char *buf ,   4096 extern UInt ( /* format attribute */  vgPlain_vsprintf)(Char *buf ,
4097                                                         HChar const   *format ,   4097                                                         HChar const   *format ,
4098                                                         va_list vargs ) ;   4098                                                         va_list vargs ) ;
4099 extern UInt ( /* format attribute */  vgPlain_snprintf)(Char *buf , Int size ,   4099 extern UInt ( /* format attribute */  vgPlain_snprintf)(Char *buf , Int size ,
4100                                                         HChar const   *format   4100                                                         HChar const   *format
4101                                                         , ...) ;   4101                                                         , ...) ;
4102 extern UInt ( /* format attribute */  vgPlain_vsnprintf)(Char *buf , Int size ,   4102 extern UInt ( /* format attribute */  vgPlain_vsnprintf)(Char *buf , Int size ,
4103                                                          HChar const   *format ,   4103                                                          HChar const   *format ,
4104                                                          va_list vargs ) ;   4104                                                          va_list vargs ) ;
4105 extern void vgPlain_percentify(ULong n , ULong m , UInt d , Int n_buf ,   4105 extern void vgPlain_percentify(ULong n , ULong m , UInt d , Int n_buf ,
4106                                char *buf ) ;   4106                                char *buf ) ;
4107 extern UInt ( /* format attribute */  vgPlain_printf)(HChar const   *format   4107 extern UInt ( /* format attribute */  vgPlain_printf)(HChar const   *format
4108                                                       , ...) ;   4108                                                       , ...) ;
4109 extern UInt ( /* format attribute */  vgPlain_vprintf)(HChar const   *format ,   4109 extern UInt ( /* format attribute */  vgPlain_vprintf)(HChar const   *format ,
4110                                                        va_list vargs ) ;   4110                                                        va_list vargs ) ;
4111 extern UInt ( /* format attribute */  vgPlain_printf_xml)(HChar const   *format   4111 extern UInt ( /* format attribute */  vgPlain_printf_xml)(HChar const   *format
4112                                                           , ...) ;   4112                                                           , ...) ;
4113 extern UInt ( /* format attribute */  vgPlain_vprintf_xml)(HChar const   *format ,   4113 extern UInt ( /* format attribute */  vgPlain_vprintf_xml)(HChar const   *format ,
4114                                                            va_list vargs ) ;   4114                                                            va_list vargs ) ;
4115 extern UInt vgPlain_printf_xml_no_f_c(HChar const   *format  , ...) ;   4115 extern UInt vgPlain_printf_xml_no_f_c(HChar const   *format  , ...) ;
4116 extern void vgPlain_vcbprintf(void (*char_sink)(HChar  , void *opaque ) ,   4116 extern void vgPlain_vcbprintf(void (*char_sink)(HChar  , void *opaque ) ,
4117                               void *opaque , HChar const   *format ,   4117                               void *opaque , HChar const   *format ,
4118                               va_list vargs ) ;   4118                               va_list vargs ) ;
4119 extern UInt vgPlain_message_no_f_c(VgMsgKind kind , HChar const   *format  , ...) ;   4119 extern UInt vgPlain_message_no_f_c(VgMsgKind kind , HChar const   *format  , ...) ;
4120 extern UInt ( /* format attribute */  vgPlain_message)(VgMsgKind kind ,   4120 extern UInt ( /* format attribute */  vgPlain_message)(VgMsgKind kind ,
4121                                                        HChar const   *format   4121                                                        HChar const   *format
4122                                                        , ...) ;   4122                                                        , ...) ;
4123 extern UInt ( /* format attribute */  vgPlain_vmessage)(VgMsgKind kind ,   4123 extern UInt ( /* format attribute */  vgPlain_vmessage)(VgMsgKind kind ,
4124                                                         HChar const   *format ,   4124                                                         HChar const   *format ,
4125                                                         va_list vargs ) ;   4125                                                         va_list vargs ) ;
4126 extern UInt ( /* format attribute */  vgPlain_fmsg)(HChar const   *format  , ...) ;   4126 extern UInt ( /* format attribute */  vgPlain_fmsg)(HChar const   *format  , ...) ;
4127 extern  __attribute__((__noreturn__)) void ( /* format attribute */  vgPlain_fmsg_bad_option)(HChar *opt ,   4127 extern  __attribute__((__noreturn__)) void ( /* format attribute */  vgPlain_fmsg_bad_option)(HChar *opt ,
4128                                                                                               HChar const   *format   4128                                                                                               HChar const   *format
4129                                                                                               , ...) ;   4129                                                                                               , ...) ;
4130 extern UInt ( /* format attribute */  vgPlain_umsg)(HChar const   *format  , ...) ;   4130 extern UInt ( /* format attribute */  vgPlain_umsg)(HChar const   *format  , ...) ;
4131 extern UInt ( /* format attribute */  vgPlain_dmsg)(HChar const   *format  , ...) ;   4131 extern UInt ( /* format attribute */  vgPlain_dmsg)(HChar const   *format  , ...) ;
4132 extern void vgPlain_message_flush(void) ;   4132 extern void vgPlain_message_flush(void) ;
4133 extern OutputSink vgPlain_log_output_sink ;   4133 extern OutputSink vgPlain_log_output_sink ;
4134 extern OutputSink vgPlain_xml_output_sink ;   4134 extern OutputSink vgPlain_xml_output_sink ;
4135 extern void vgPlain_elapsed_wallclock_time(HChar *buf ) ;   4135 extern void vgPlain_elapsed_wallclock_time(HChar *buf ) ;
4136 extern  __attribute__((__noreturn__)) void vgPlain_err_missing_prog(void) ;   4136 extern  __attribute__((__noreturn__)) void vgPlain_err_missing_prog(void) ;
4137 extern  __attribute__((__noreturn__)) void vgPlain_err_config_error(Char *msg ) ;   4137 extern  __attribute__((__noreturn__)) void vgPlain_err_config_error(Char *msg ) ;
4138 extern Char **vgPlain_client_envp ;   4138 extern Char **vgPlain_client_envp ;
4139 extern Char *vgPlain_getenv(Char *name ) ;   4139 extern Char *vgPlain_getenv(Char *name ) ;
4140 extern Char const   *vgPlain_libdir ;   4140 extern Char const   *vgPlain_libdir ;
4141 extern Char const   *vgPlain_LD_PRELOAD_var_name ;   4141 extern Char const   *vgPlain_LD_PRELOAD_var_name ;
4142 extern Int vgPlain_waitpid(Int pid , Int *status , Int options ) ;   4142 extern Int vgPlain_waitpid(Int pid , Int *status , Int options ) ;
4143 extern Int vgPlain_system(Char *cmd ) ;   4143 extern Int vgPlain_system(Char *cmd ) ;
4144 extern Int vgPlain_fork(void) ;   4144 extern Int vgPlain_fork(void) ;
4145 extern void vgPlain_execv(Char *filename , Char **argv ) ;   4145 extern void vgPlain_execv(Char *filename , Char **argv ) ;
4146 extern Int vgPlain_getrlimit(Int resource , struct vki_rlimit *rlim ) ;   4146 extern Int vgPlain_getrlimit(Int resource , struct vki_rlimit *rlim ) ;
4147 extern Int vgPlain_setrlimit(Int resource , struct vki_rlimit  const  *rlim ) ;   4147 extern Int vgPlain_setrlimit(Int resource , struct vki_rlimit  const  *rlim ) ;
4148 extern Int vgPlain_prctl(Int option , ULong arg2 , ULong arg3 , ULong arg4 ,   4148 extern Int vgPlain_prctl(Int option , ULong arg2 , ULong arg3 , ULong arg4 ,
4149                          ULong arg5 ) ;   4149                          ULong arg5 ) ;
4150 extern Int vgPlain_gettid(void) ;   4150 extern Int vgPlain_gettid(void) ;
4151 extern Int vgPlain_getpid(void) ;   4151 extern Int vgPlain_getpid(void) ;
4152 extern Int vgPlain_getppid(void) ;   4152 extern Int vgPlain_getppid(void) ;
4153 extern Int vgPlain_getpgrp(void) ;   4153 extern Int vgPlain_getpgrp(void) ;
4154 extern Int vgPlain_geteuid(void) ;   4154 extern Int vgPlain_geteuid(void) ;
4155 extern Int vgPlain_getegid(void) ;   4155 extern Int vgPlain_getegid(void) ;
4156 extern UInt vgPlain_read_millisecond_timer(void) ;   4156 extern UInt vgPlain_read_millisecond_timer(void) ;
4157 extern void vgPlain_atfork(void (*pre)(ThreadId  ) ,   4157 extern void vgPlain_atfork(void (*pre)(ThreadId  ) ,
4158                            void (*parent)(ThreadId  ) ,   4158                            void (*parent)(ThreadId  ) ,
4159                            void (*child)(ThreadId  ) ) ;   4159                            void (*child)(ThreadId  ) ) ;
4160 extern Char **vgPlain_env_setenv(Char ***envp , Char const   *varname ,   4160 extern Char **vgPlain_env_setenv(Char ***envp , Char const   *varname ,
4161                                  Char const   *val ) ;   4161                                  Char const   *val ) ;
4162 extern void vgPlain_env_unsetenv(Char **env , Char const   *varname ) ;   4162 extern void vgPlain_env_unsetenv(Char **env , Char const   *varname ) ;
4163 extern void vgPlain_env_remove_valgrind_env_stuff(Char **env ) ;   4163 extern void vgPlain_env_remove_valgrind_env_stuff(Char **env ) ;
4164 extern Char **vgPlain_env_clone(Char **env_clone ) ;   4164 extern Char **vgPlain_env_clone(Char **env_clone ) ;
4165 extern Int vgPlain_getgroups(Int size , UInt *list ) ;   4165 extern Int vgPlain_getgroups(Int size , UInt *list ) ;
4166 extern Int vgPlain_ptrace(Int request , Int pid , void *addr , void *data ) ;   4166 extern Int vgPlain_ptrace(Int request , Int pid , void *addr , void *data ) ;
4167 extern void vgPlain_do_atfork_pre(ThreadId tid ) ;   4167 extern void vgPlain_do_atfork_pre(ThreadId tid ) ;
4168 extern void vgPlain_do_atfork_parent(ThreadId tid ) ;   4168 extern void vgPlain_do_atfork_parent(ThreadId tid ) ;
4169 extern void vgPlain_do_atfork_child(ThreadId tid ) ;   4169 extern void vgPlain_do_atfork_child(ThreadId tid ) ;
4170 extern Int vgPlain_sigprocmask(Int how , vki_sigset_t const   *set ,   4170 extern Int vgPlain_sigprocmask(Int how , vki_sigset_t const   *set ,
4171                                vki_sigset_t *oldset ) ;   4171                                vki_sigset_t *oldset ) ;
4172 extern Int vgPlain_sigfillset(vki_sigset_t *set ) ;   4172 extern Int vgPlain_sigfillset(vki_sigset_t *set ) ;
4173 extern Int vgPlain_sigemptyset(vki_sigset_t *set ) ;   4173 extern Int vgPlain_sigemptyset(vki_sigset_t *set ) ;
4174 extern Bool vgPlain_isfullsigset(vki_sigset_t const   *set ) ;   4174 extern Bool vgPlain_isfullsigset(vki_sigset_t const   *set ) ;
4175 extern Bool vgPlain_isemptysigset(vki_sigset_t const   *set ) ;   4175 extern Bool vgPlain_isemptysigset(vki_sigset_t const   *set ) ;
4176 extern Bool vgPlain_iseqsigset(vki_sigset_t const   *set1 ,   4176 extern Bool vgPlain_iseqsigset(vki_sigset_t const   *set1 ,
4177                                vki_sigset_t const   *set2 ) ;   4177                                vki_sigset_t const   *set2 ) ;
4178 extern Int vgPlain_sigaddset(vki_sigset_t *set , Int signum ) ;   4178 extern Int vgPlain_sigaddset(vki_sigset_t *set , Int signum ) ;
4179 extern Int vgPlain_sigdelset(vki_sigset_t *set , Int signum ) ;   4179 extern Int vgPlain_sigdelset(vki_sigset_t *set , Int signum ) ;
4180 extern Int vgPlain_sigismember(vki_sigset_t const   *set , Int signum ) ;   4180 extern Int vgPlain_sigismember(vki_sigset_t const   *set , Int signum ) ;
4181 extern void vgPlain_sigaddset_from_set(vki_sigset_t *dst , vki_sigset_t *src ) ;   4181 extern void vgPlain_sigaddset_from_set(vki_sigset_t *dst , vki_sigset_t *src ) ;
4182 extern void vgPlain_sigdelset_from_set(vki_sigset_t *dst , vki_sigset_t *src ) ;   4182 extern void vgPlain_sigdelset_from_set(vki_sigset_t *dst , vki_sigset_t *src ) ;
4183 extern void vgPlain_sigintersectset(vki_sigset_t *dst , vki_sigset_t *src ) ;   4183 extern void vgPlain_sigintersectset(vki_sigset_t *dst , vki_sigset_t *src ) ;
4184 extern void vgPlain_sigcomplementset(vki_sigset_t *dst , vki_sigset_t *src ) ;   4184 extern void vgPlain_sigcomplementset(vki_sigset_t *dst , vki_sigset_t *src ) ;
4185 extern Int vgPlain_sigaction(Int signum , vki_sigaction_toK_t const   *act ,   4185 extern Int vgPlain_sigaction(Int signum , vki_sigaction_toK_t const   *act ,
4186                              vki_sigaction_fromK_t *oldact ) ;   4186                              vki_sigaction_fromK_t *oldact ) ;
4187 extern void vgPlain_convert_sigaction_fromK_to_toK(vki_sigaction_fromK_t * ,   4187 extern void vgPlain_convert_sigaction_fromK_to_toK(vki_sigaction_fromK_t * ,
4188                                                    vki_sigaction_toK_t * ) ;   4188                                                    vki_sigaction_toK_t * ) ;
4189 extern Int vgPlain_kill(Int pid , Int signo ) ;   4189 extern Int vgPlain_kill(Int pid , Int signo ) ;
4190 extern Int vgPlain_tkill(Int lwpid , Int signo ) ;   4190 extern Int vgPlain_tkill(Int lwpid , Int signo ) ;
4191 extern Int vgPlain_sigtimedwait_zero(vki_sigset_t const   * , vki_siginfo_t * ) ;   4191 extern Int vgPlain_sigtimedwait_zero(vki_sigset_t const   * , vki_siginfo_t * ) ;
4192 extern Addr vgPlain_get_IP(ThreadId tid ) ;   4192 extern Addr vgPlain_get_IP(ThreadId tid ) ;
4193 extern Addr vgPlain_get_SP(ThreadId tid ) ;   4193 extern Addr vgPlain_get_SP(ThreadId tid ) ;
4194 extern void vgPlain_get_shadow_regs_area(ThreadId tid , UChar *dst ,   4194 extern void vgPlain_get_shadow_regs_area(ThreadId tid , UChar *dst ,
4195                                          Int shadowNo , PtrdiffT offset ,   4195                                          Int shadowNo , PtrdiffT offset ,
4196                                          SizeT size ) ;   4196                                          SizeT size ) ;
4197 extern void vgPlain_set_shadow_regs_area(ThreadId tid , Int shadowNo ,   4197 extern void vgPlain_set_shadow_regs_area(ThreadId tid , Int shadowNo ,
4198                                          PtrdiffT offset , SizeT size ,   4198                                          PtrdiffT offset , SizeT size ,
4199                                          UChar const   *src ) ;   4199                                          UChar const   *src ) ;
4200 extern void vgPlain_set_syscall_return_shadows(ThreadId tid , UWord s1res ,   4200 extern void vgPlain_set_syscall_return_shadows(ThreadId tid , UWord s1res ,
4201                                                UWord s2res , UWord s1err ,   4201                                                UWord s2res , UWord s1err ,
4202                                                UWord s2err ) ;   4202                                                UWord s2err ) ;
4203 extern void vgPlain_apply_to_GP_regs(void (*f)(UWord val ) ) ;   4203 extern void vgPlain_apply_to_GP_regs(void (*f)(UWord val ) ) ;
4204 extern void vgPlain_thread_stack_reset_iter(ThreadId *tid ) ;   4204 extern void vgPlain_thread_stack_reset_iter(ThreadId *tid ) ;
4205 extern Bool vgPlain_thread_stack_next(ThreadId *tid , Addr *stack_min ,   4205 extern Bool vgPlain_thread_stack_next(ThreadId *tid , Addr *stack_min ,
4206                                       Addr *stack_max ) ;   4206                                       Addr *stack_max ) ;
4207 extern Addr vgPlain_thread_get_stack_max(ThreadId tid ) ;   4207 extern Addr vgPlain_thread_get_stack_max(ThreadId tid ) ;
4208 extern SizeT vgPlain_thread_get_stack_size(ThreadId tid ) ;   4208 extern SizeT vgPlain_thread_get_stack_size(ThreadId tid ) ;
4209 extern Addr vgPlain_thread_get_altstack_min(ThreadId tid ) ;   4209 extern Addr vgPlain_thread_get_altstack_min(ThreadId tid ) ;
4210 extern SizeT vgPlain_thread_get_altstack_size(ThreadId tid ) ;   4210 extern SizeT vgPlain_thread_get_altstack_size(ThreadId tid ) ;
4211 extern void *vgPlain_fnptr_to_fnentry(void * ) ;   4211 extern void *vgPlain_fnptr_to_fnentry(void * ) ;
4212 extern Addr vgPlain_get_FP(ThreadId tid ) ;   4212 extern Addr vgPlain_get_FP(ThreadId tid ) ;
4213 extern void vgPlain_set_IP(ThreadId tid , Addr encip ) ;   4213 extern void vgPlain_set_IP(ThreadId tid , Addr encip ) ;
4214 extern void vgPlain_set_SP(ThreadId tid , Addr sp ) ;   4214 extern void vgPlain_set_SP(ThreadId tid , Addr sp ) ;
4215 extern void vgPlain_get_UnwindStartRegs(UnwindStartRegs *regs , ThreadId tid ) ;   4215 extern void vgPlain_get_UnwindStartRegs(UnwindStartRegs *regs , ThreadId tid ) ;
4216 extern Bool vgPlain_machine_get_hwcaps(void) ;   4216 extern Bool vgPlain_machine_get_hwcaps(void) ;
4217 extern void vgPlain_machine_get_VexArchInfo(VexArch * , VexArchInfo * ) ;   4217 extern void vgPlain_machine_get_VexArchInfo(VexArch * , VexArchInfo * ) ;
4218 extern UInt vgPlain_machine_x86_have_mxcsr ;   4218 extern UInt vgPlain_machine_x86_have_mxcsr ;
4219 extern void *vgPlain_malloc(HChar *cc , SizeT nbytes ) ;   4219 extern void *vgPlain_malloc(HChar *cc , SizeT nbytes ) ;
4220 extern void vgPlain_free(void *p ) ;   4220 extern void vgPlain_free(void *p ) ;
4221 extern void *vgPlain_calloc(HChar *cc , SizeT n , SizeT bytes_per_elem ) ;   4221 extern void *vgPlain_calloc(HChar *cc , SizeT n , SizeT bytes_per_elem ) ;
4222 extern void *vgPlain_realloc(HChar *cc , void *p , SizeT size ) ;   4222 extern void *vgPlain_realloc(HChar *cc , void *p , SizeT size ) ;
4223 extern Char *vgPlain_strdup(HChar *cc , Char const   *s ) ;   4223 extern Char *vgPlain_strdup(HChar *cc , Char const   *s ) ;
4224 extern SizeT vgPlain_malloc_usable_size(void *p ) ;   4224 extern SizeT vgPlain_malloc_usable_size(void *p ) ;
4225 extern  __attribute__((__noreturn__)) void vgPlain_out_of_memory_NORETURN(HChar *who ,   4225 extern  __attribute__((__noreturn__)) void vgPlain_out_of_memory_NORETURN(HChar *who ,
4226                                                                           SizeT szB ) ;   4226                                                                           SizeT szB ) ;
4227 extern void *vgPlain_arena_malloc(ArenaId arena , HChar *cc , SizeT nbytes ) ;   4227 extern void *vgPlain_arena_malloc(ArenaId arena , HChar *cc , SizeT nbytes ) ;
4228 extern void vgPlain_arena_free(ArenaId arena , void *ptr ) ;   4228 extern void vgPlain_arena_free(ArenaId arena , void *ptr ) ;
4229 extern void *vgPlain_arena_calloc(ArenaId arena , HChar *cc , SizeT nmemb ,   4229 extern void *vgPlain_arena_calloc(ArenaId arena , HChar *cc , SizeT nmemb ,
4230                                   SizeT bytes_per_memb ) ;   4230                                   SizeT bytes_per_memb ) ;
4231 extern void *vgPlain_arena_realloc(ArenaId arena , HChar *cc , void *ptr ,   4231 extern void *vgPlain_arena_realloc(ArenaId arena , HChar *cc , void *ptr ,
4232                                    SizeT size ) ;   4232                                    SizeT size ) ;
4233 extern void *vgPlain_arena_memalign(ArenaId aid , HChar *cc , SizeT req_alignB ,   4233 extern void *vgPlain_arena_memalign(ArenaId aid , HChar *cc , SizeT req_alignB ,
4234                                     SizeT req_pszB ) ;   4234                                     SizeT req_pszB ) ;
4235 extern Char *vgPlain_arena_strdup(ArenaId aid , HChar *cc , Char const   *s ) ;   4235 extern Char *vgPlain_arena_strdup(ArenaId aid , HChar *cc , Char const   *s ) ;
4236 extern SizeT vgPlain_arena_malloc_usable_size(ArenaId aid , void *payload ) ;   4236 extern SizeT vgPlain_arena_malloc_usable_size(ArenaId aid , void *payload ) ;
4237 extern void vgPlain_mallinfo(ThreadId tid , struct vg_mallinfo *mi ) ;   4237 extern void vgPlain_mallinfo(ThreadId tid , struct vg_mallinfo *mi ) ;
4238 extern void vgPlain_sanity_check_malloc_all(void) ;   4238 extern void vgPlain_sanity_check_malloc_all(void) ;
4239 extern void vgPlain_print_all_arena_stats(void) ;   4239 extern void vgPlain_print_all_arena_stats(void) ;
4240 extern void vgPlain_print_arena_cc_analysis(void) ;   4240 extern void vgPlain_print_arena_cc_analysis(void) ;
4241 extern Int vgPlain_clo_verbosity ;   4241 extern Int vgPlain_clo_verbosity ;
4242 extern Bool vgPlain_clo_stats ;   4242 extern Bool vgPlain_clo_stats ;
4243 extern Int vgPlain_clo_vgdb_error ;   4243 extern Int vgPlain_clo_vgdb_error ;
4244 extern Bool vgPlain_clo_xml ;   4244 extern Bool vgPlain_clo_xml ;
4245 extern HChar *vgPlain_clo_xml_user_comment ;   4245 extern HChar *vgPlain_clo_xml_user_comment ;
4246 extern VexControl vgPlain_clo_vex_control ;   4246 extern VexControl vgPlain_clo_vex_control ;
4247 extern Int vgPlain_clo_backtrace_size ;   4247 extern Int vgPlain_clo_backtrace_size ;
4248 extern Bool vgPlain_clo_show_below_main ;   4248 extern Bool vgPlain_clo_show_below_main ;
4249 extern Char *vgPlain_expand_file_name(Char *option_name , Char *format ) ;   4249 extern Char *vgPlain_expand_file_name(Char *option_name , Char *format ) ;
4250 extern Bool vgPlain_clo_error_limit ;   4250 extern Bool vgPlain_clo_error_limit ;
4251 extern Int vgPlain_clo_error_exitcode ;   4251 extern Int vgPlain_clo_error_exitcode ;
4252 extern VgVgdb vgPlain_clo_vgdb ;   4252 extern VgVgdb vgPlain_clo_vgdb ;
4253 extern Int vgPlain_clo_vgdb_poll ;   4253 extern Int vgPlain_clo_vgdb_poll ;
4254 extern Char *vgPlain_clo_vgdb_prefix ;   4254 extern Char *vgPlain_clo_vgdb_prefix ;
4255 extern Bool vgPlain_clo_vgdb_shadow_registers ;   4255 extern Bool vgPlain_clo_vgdb_shadow_registers ;
4256 extern Bool vgPlain_clo_db_attach ;   4256 extern Bool vgPlain_clo_db_attach ;
4257 extern Char *vgPlain_clo_db_command ;   4257 extern Char *vgPlain_clo_db_command ;
4258 extern Int vgPlain_clo_gen_suppressions ;   4258 extern Int vgPlain_clo_gen_suppressions ;
4259 extern Int vgPlain_clo_sanity_level ;   4259 extern Int vgPlain_clo_sanity_level ;
4260 extern Bool vgPlain_clo_demangle ;   4260 extern Bool vgPlain_clo_demangle ;
4261 extern Bool vgPlain_clo_trace_children ;   4261 extern Bool vgPlain_clo_trace_children ;
4262 extern HChar *vgPlain_clo_trace_children_skip ;   4262 extern HChar *vgPlain_clo_trace_children_skip ;
4263 extern HChar *vgPlain_clo_trace_children_skip_by_arg ;   4263 extern HChar *vgPlain_clo_trace_children_skip_by_arg ;
4264 extern Bool vgPlain_clo_child_silent_after_fork ;   4264 extern Bool vgPlain_clo_child_silent_after_fork ;
4265 extern Char *vgPlain_clo_log_fname_expanded ;   4265 extern Char *vgPlain_clo_log_fname_expanded ;
4266 extern Char *vgPlain_clo_xml_fname_expanded ;   4266 extern Char *vgPlain_clo_xml_fname_expanded ;
4267 extern Bool vgPlain_clo_time_stamp ;   4267 extern Bool vgPlain_clo_time_stamp ;
4268 extern Int vgPlain_clo_input_fd ;   4268 extern Int vgPlain_clo_input_fd ;
4269 extern Int vgPlain_clo_n_suppressions ;   4269 extern Int vgPlain_clo_n_suppressions ;
4270 extern Char *vgPlain_clo_suppressions[100] ;   4270 extern Char *vgPlain_clo_suppressions[100] ;
4271 extern Int vgPlain_clo_n_fullpath_after ;   4271 extern Int vgPlain_clo_n_fullpath_after ;
4272 extern Char *vgPlain_clo_fullpath_after[100] ;   4272 extern Char *vgPlain_clo_fullpath_after[100] ;
4273 extern UChar vgPlain_clo_trace_flags ;   4273 extern UChar vgPlain_clo_trace_flags ;
4274 extern UChar vgPlain_clo_profile_flags ;   4274 extern UChar vgPlain_clo_profile_flags ;
4275 extern Int vgPlain_clo_trace_notbelow ;   4275 extern Int vgPlain_clo_trace_notbelow ;
4276 extern Bool vgPlain_clo_trace_syscalls ;   4276 extern Bool vgPlain_clo_trace_syscalls ;
4277 extern Bool vgPlain_clo_trace_signals ;   4277 extern Bool vgPlain_clo_trace_signals ;
4278 extern Bool vgPlain_clo_trace_symtab ;   4278 extern Bool vgPlain_clo_trace_symtab ;
4279 extern HChar *vgPlain_clo_trace_symtab_patt ;   4279 extern HChar *vgPlain_clo_trace_symtab_patt ;
4280 extern Bool vgPlain_clo_trace_cfi ;   4280 extern Bool vgPlain_clo_trace_cfi ;
4281 extern Bool vgPlain_clo_debug_dump_syms ;   4281 extern Bool vgPlain_clo_debug_dump_syms ;
4282 extern Bool vgPlain_clo_debug_dump_line ;   4282 extern Bool vgPlain_clo_debug_dump_line ;
4283 extern Bool vgPlain_clo_debug_dump_frames ;   4283 extern Bool vgPlain_clo_debug_dump_frames ;
4284 extern Bool vgPlain_clo_trace_redir ;   4284 extern Bool vgPlain_clo_trace_redir ;
4285 extern Bool vgPlain_clo_trace_sched ;   4285 extern Bool vgPlain_clo_trace_sched ;
4286 extern Bool vgPlain_clo_profile_heap ;   4286 extern Bool vgPlain_clo_profile_heap ;
4287 extern Int vgPlain_clo_dump_error ;   4287 extern Int vgPlain_clo_dump_error ;
4288 extern Char *vgPlain_clo_sim_hints ;   4288 extern Char *vgPlain_clo_sim_hints ;
4289 extern Bool vgPlain_clo_sym_offsets ;   4289 extern Bool vgPlain_clo_sym_offsets ;
4290 extern Bool vgPlain_clo_read_var_info ;   4290 extern Bool vgPlain_clo_read_var_info ;
4291 extern Char *vgPlain_clo_prefix_to_strip ;   4291 extern Char *vgPlain_clo_prefix_to_strip ;
4292 extern Int vgPlain_clo_n_req_tsyms ;   4292 extern Int vgPlain_clo_n_req_tsyms ;
4293 extern HChar *vgPlain_clo_req_tsyms[100] ;   4293 extern HChar *vgPlain_clo_req_tsyms[100] ;
4294 extern Bool vgPlain_clo_track_fds ;   4294 extern Bool vgPlain_clo_track_fds ;
4295 extern Bool vgPlain_clo_run_libc_freeres ;   4295 extern Bool vgPlain_clo_run_libc_freeres ;
4296 extern Bool vgPlain_clo_show_emwarns ;   4296 extern Bool vgPlain_clo_show_emwarns ;
4297 extern Word vgPlain_clo_max_stackframe ;   4297 extern Word vgPlain_clo_max_stackframe ;
4298 extern Word vgPlain_clo_main_stacksize ;   4298 extern Word vgPlain_clo_main_stacksize ;
4299 extern Bool vgPlain_clo_wait_for_gdb ;   4299 extern Bool vgPlain_clo_wait_for_gdb ;
4300 extern VgSmc vgPlain_clo_smc_check ;   4300 extern VgSmc vgPlain_clo_smc_check ;
4301 extern HChar *vgPlain_clo_kernel_variant ;   4301 extern HChar *vgPlain_clo_kernel_variant ;
4302 extern Bool vgPlain_clo_dsymutil ;   4302 extern Bool vgPlain_clo_dsymutil ;
4303 extern Bool vgPlain_should_we_trace_this_child(HChar *child_exe_name ,   4303 extern Bool vgPlain_should_we_trace_this_child(HChar *child_exe_name ,
4304                                                HChar **child_argv ) ;   4304                                                HChar **child_argv ) ;
4305 extern void *vgPlain_cli_malloc(SizeT align , SizeT nbytes ) ;   4305 extern void *vgPlain_cli_malloc(SizeT align , SizeT nbytes ) ;
4306 extern void vgPlain_cli_free(void *p ) ;   4306 extern void vgPlain_cli_free(void *p ) ;
4307 extern Long vgPlain_free_queue_volume ;   4307 extern Long vgPlain_free_queue_volume ;
4308 extern Long vgPlain_free_queue_length ;   4308 extern Long vgPlain_free_queue_length ;
4309 extern Bool vgPlain_addr_is_in_block(Addr a , Addr start , SizeT size ,   4309 extern Bool vgPlain_addr_is_in_block(Addr a , Addr start , SizeT size ,
4310                                      SizeT rz_szB ) ;   4310                                      SizeT rz_szB ) ;
4311 extern Bool vgPlain_clo_trace_malloc ;   4311 extern Bool vgPlain_clo_trace_malloc ;
4312 extern UInt vgPlain_clo_alignment ;   4312 extern UInt vgPlain_clo_alignment ;
4313 extern Bool vgPlain_replacement_malloc_process_cmd_line_option(Char *arg ) ;   4313 extern Bool vgPlain_replacement_malloc_process_cmd_line_option(Char *arg ) ;
4314 extern void vgPlain_set_fault_catcher(void (*catcher)(Int sig , Addr addr ) ) ;   4314 extern void vgPlain_set_fault_catcher(void (*catcher)(Int sig , Addr addr ) ) ;
4315 extern Int vgPlain_max_signal ;   4315 extern Int vgPlain_max_signal ;
4316 extern void vgPlain_sigstartup_actions(void) ;   4316 extern void vgPlain_sigstartup_actions(void) ;
4317 extern void vgPlain_poll_signals(ThreadId  ) ;   4317 extern void vgPlain_poll_signals(ThreadId  ) ;
4318 extern SysRes vgPlain_do_sys_sigaltstack(ThreadId tid , vki_stack_t *ss ,   4318 extern SysRes vgPlain_do_sys_sigaltstack(ThreadId tid , vki_stack_t *ss ,
4319                                          vki_stack_t *oss ) ;   4319                                          vki_stack_t *oss ) ;
4320 extern SysRes vgPlain_do_sys_sigaction(Int signo ,   4320 extern SysRes vgPlain_do_sys_sigaction(Int signo ,
4321                                        vki_sigaction_toK_t const   *new_act ,   4321                                        vki_sigaction_toK_t const   *new_act ,
4322                                        vki_sigaction_fromK_t *old_act ) ;   4322                                        vki_sigaction_fromK_t *old_act ) ;
4323 extern SysRes vgPlain_do_sys_sigprocmask(ThreadId tid , Int how ,   4323 extern SysRes vgPlain_do_sys_sigprocmask(ThreadId tid , Int how ,
4324                                          vki_sigset_t *set ,   4324                                          vki_sigset_t *set ,
4325                                          vki_sigset_t *oldset ) ;   4325                                          vki_sigset_t *oldset ) ;
4326 extern void vgPlain_clear_out_queued_signals(ThreadId tid ,   4326 extern void vgPlain_clear_out_queued_signals(ThreadId tid ,
4327                                              vki_sigset_t *saved_mask ) ;   4327                                              vki_sigset_t *saved_mask ) ;
4328 extern void vgPlain_kill_self(Int sigNo ) ;   4328 extern void vgPlain_kill_self(Int sigNo ) ;
4329 extern void vgPlain_synth_fault(ThreadId tid ) ;   4329 extern void vgPlain_synth_fault(ThreadId tid ) ;
4330 extern void vgPlain_synth_fault_mapping(ThreadId tid , Addr addr ) ;   4330 extern void vgPlain_synth_fault_mapping(ThreadId tid , Addr addr ) ;
4331 extern void vgPlain_synth_fault_perms(ThreadId tid , Addr addr ) ;   4331 extern void vgPlain_synth_fault_perms(ThreadId tid , Addr addr ) ;
4332 extern void vgPlain_synth_sigill(ThreadId tid , Addr addr ) ;   4332 extern void vgPlain_synth_sigill(ThreadId tid , Addr addr ) ;
4333 extern void vgPlain_synth_sigtrap(ThreadId tid ) ;   4333 extern void vgPlain_synth_sigtrap(ThreadId tid ) ;
4334 extern void vgPlain_synth_sigbus(ThreadId tid ) ;   4334 extern void vgPlain_synth_sigbus(ThreadId tid ) ;
4335 extern Bool vgPlain_extend_stack(Addr addr , UInt maxsize ) ;   4335 extern Bool vgPlain_extend_stack(Addr addr , UInt maxsize ) ;
4336 extern void vgPlain_set_default_handler(Int sig ) ;   4336 extern void vgPlain_set_default_handler(Int sig ) ;
4337 extern UWord vgPlain_register_stack(Addr start , Addr end ) ;   4337 extern UWord vgPlain_register_stack(Addr start , Addr end ) ;
4338 extern void vgPlain_deregister_stack(UWord id ) ;   4338 extern void vgPlain_deregister_stack(UWord id ) ;
4339 extern void vgPlain_change_stack(UWord id , Addr start , Addr end ) ;   4339 extern void vgPlain_change_stack(UWord id , Addr start , Addr end ) ;
4340 extern void vgPlain_stack_limits(Addr SP , Addr *start , Addr *end ) ;   4340 extern void vgPlain_stack_limits(Addr SP , Addr *start , Addr *end ) ;
4341 extern void ( __attribute__((__regparm__(3))) vgPlain_unknown_SP_update)(Addr old_SP ,   4341 extern void ( __attribute__((__regparm__(3))) vgPlain_unknown_SP_update)(Addr old_SP ,
4342                                                                          Addr new_SP ,   4342                                                                          Addr new_SP ,
4343                                                                          UInt otag ) ;   4343                                                                          UInt otag ) ;
4344 extern UInt vgPlain_get_StackTrace(ThreadId tid , StackTrace ips , UInt n_ips ,   4344 extern UInt vgPlain_get_StackTrace(ThreadId tid , StackTrace ips , UInt n_ips ,
4345                                    StackTrace sps , StackTrace fps ,   4345                                    StackTrace sps , StackTrace fps ,
4346                                    Word first_ip_delta ) ;   4346                                    Word first_ip_delta ) ;
4347 extern void vgPlain_apply_StackTrace(void (*action)(UInt n , Addr ip ,   4347 extern void vgPlain_apply_StackTrace(void (*action)(UInt n , Addr ip ,
4348                                                     void *opaque ) ,   4348                                                     void *opaque ) ,
4349                                      void *opaque , StackTrace ips , UInt n_ips ) ;   4349                                      void *opaque , StackTrace ips , UInt n_ips ) ;
4350 extern void vgPlain_pp_StackTrace(StackTrace ips , UInt n_ips ) ;   4350 extern void vgPlain_pp_StackTrace(StackTrace ips , UInt n_ips ) ;
4351 extern void vgPlain_get_and_pp_StackTrace(ThreadId tid , UInt n_ips ) ;   4351 extern void vgPlain_get_and_pp_StackTrace(ThreadId tid , UInt n_ips ) ;
4352 extern UInt vgPlain_get_StackTrace_wrk(ThreadId tid_if_known , Addr *ips ,   4352 extern UInt vgPlain_get_StackTrace_wrk(ThreadId tid_if_known , Addr *ips ,
4353                                        UInt n_ips , Addr *sps , Addr *fps ,   4353                                        UInt n_ips , Addr *sps , Addr *fps ,
4354                                        UnwindStartRegs *startRegs ,   4354                                        UnwindStartRegs *startRegs ,
4355                                        Addr fp_max_orig ) ;   4355                                        Addr fp_max_orig ) ;
4356 extern SysRes vgPlain_do_syscall(UWord sysno , UWord  , UWord  , UWord  ,   4356 extern SysRes vgPlain_do_syscall(UWord sysno , UWord  , UWord  , UWord  ,
4357                                  UWord  , UWord  , UWord  , UWord  , UWord  ) ;   4357                                  UWord  , UWord  , UWord  , UWord  , UWord  ) ;
4358 extern SysRes vgPlain_mk_SysRes_x86_linux(Int val ) ;   4358 extern SysRes vgPlain_mk_SysRes_x86_linux(Int val ) ;
4359 extern SysRes vgPlain_mk_SysRes_amd64_linux(Long val ) ;   4359 extern SysRes vgPlain_mk_SysRes_amd64_linux(Long val ) ;
4360 extern SysRes vgPlain_mk_SysRes_ppc32_linux(UInt val , UInt cr0so ) ;   4360 extern SysRes vgPlain_mk_SysRes_ppc32_linux(UInt val , UInt cr0so ) ;
4361 extern SysRes vgPlain_mk_SysRes_ppc64_linux(ULong val , ULong cr0so ) ;   4361 extern SysRes vgPlain_mk_SysRes_ppc64_linux(ULong val , ULong cr0so ) ;
4362 extern SysRes vgPlain_mk_SysRes_arm_linux(Int val ) ;   4362 extern SysRes vgPlain_mk_SysRes_arm_linux(Int val ) ;
4363 extern SysRes vgPlain_mk_SysRes_ppc32_aix5(UInt val , UInt err ) ;   4363 extern SysRes vgPlain_mk_SysRes_ppc32_aix5(UInt val , UInt err ) ;
4364 extern SysRes vgPlain_mk_SysRes_ppc64_aix5(ULong val , ULong err ) ;   4364 extern SysRes vgPlain_mk_SysRes_ppc64_aix5(ULong val , ULong err ) ;
4365 extern SysRes vgPlain_mk_SysRes_x86_darwin(UChar scclass , Bool isErr ,   4365 extern SysRes vgPlain_mk_SysRes_x86_darwin(UChar scclass , Bool isErr ,
4366                                            UInt wHI , UInt wLO ) ;   4366                                            UInt wHI , UInt wLO ) ;
4367 extern SysRes vgPlain_mk_SysRes_amd64_darwin(UChar scclass , Bool isErr ,   4367 extern SysRes vgPlain_mk_SysRes_amd64_darwin(UChar scclass , Bool isErr ,
4368                                              ULong wHI , ULong wLO ) ;   4368                                              ULong wHI , ULong wLO ) ;
4369 extern SysRes vgPlain_mk_SysRes_s390x_linux(Long val ) ;   4369 extern SysRes vgPlain_mk_SysRes_s390x_linux(Long val ) ;
4370 extern SysRes vgPlain_mk_SysRes_Error(UWord val ) ;   4370 extern SysRes vgPlain_mk_SysRes_Error(UWord val ) ;
4371 extern SysRes vgPlain_mk_SysRes_Success(UWord val ) ;   4371 extern SysRes vgPlain_mk_SysRes_Success(UWord val ) ;
4372 extern HChar const   *vgPlain_strerror(UWord errnum ) ;   4372 extern HChar const   *vgPlain_strerror(UWord errnum ) ;
4373 extern void vgPlain_main_thread_wrapper_NORETURN(ThreadId tid ) ;   4373 extern void vgPlain_main_thread_wrapper_NORETURN(ThreadId tid ) ;
4374 extern void vgPlain_client_syscall(ThreadId tid , UInt trc ) ;   4374 extern void vgPlain_client_syscall(ThreadId tid , UInt trc ) ;
4375 extern void vgPlain_post_syscall(ThreadId tid ) ;   4375 extern void vgPlain_post_syscall(ThreadId tid ) ;
4376 extern void vgPlain_clear_syscallInfo(Int tid ) ;   4376 extern void vgPlain_clear_syscallInfo(Int tid ) ;
4377 extern void vgPlain_fixup_guest_state_after_syscall_interrupted(ThreadId tid ,   4377 extern void vgPlain_fixup_guest_state_after_syscall_interrupted(ThreadId tid ,
4378                                                                 Addr ip ,   4378                                                                 Addr ip ,
4379                                                                 SysRes sysret ,   4379                                                                 SysRes sysret ,
4380                                                                 Bool restart ) ;   4380                                                                 Bool restart ) ;
4381 extern void vgPlain_reap_threads(ThreadId self ) ;   4381 extern void vgPlain_reap_threads(ThreadId self ) ;
4382 extern void vgPlain_cleanup_thread(ThreadArchState * ) ;   4382 extern void vgPlain_cleanup_thread(ThreadArchState * ) ;
4383 extern void vgPlain_init_preopened_fds(void) ;   4383 extern void vgPlain_init_preopened_fds(void) ;
4384 extern void vgPlain_show_open_fds(void) ;   4384 extern void vgPlain_show_open_fds(void) ;
4385 extern void (*vgPlain_address_of_m_main_shutdown_actions_NORETURN)(ThreadId  ,   4385 extern void (*vgPlain_address_of_m_main_shutdown_actions_NORETURN)(ThreadId  ,
4386                                                                    VgSchedReturnCode  ) ;   4386                                                                    VgSchedReturnCode  ) ;
4387 extern void (*vgPlain_tl_pre_clo_init)(void) ;   4387 extern void (*vgPlain_tl_pre_clo_init)(void) ;
4388 extern void vgPlain_basic_tool_funcs(void (*post_clo_init)(void) ,   4388 extern void vgPlain_basic_tool_funcs(void (*post_clo_init)(void) ,
4389                                      IRSB *(*instrument)(VgCallbackClosure *closure ,   4389                                      IRSB *(*instrument)(VgCallbackClosure *closure ,
4390                                                          IRSB *sb_in ,   4390                                                          IRSB *sb_in ,
4391                                                          VexGuestLayout *layout ,   4391                                                          VexGuestLayout *layout ,
4392                                                          VexGuestExtents *vge ,   4392                                                          VexGuestExtents *vge ,
4393                                                          IRType gWordTy ,   4393                                                          IRType gWordTy ,
4394                                                          IRType hWordTy ) ,   4394                                                          IRType hWordTy ) ,
4395                                      void (*fini)(Int  ) ) ;   4395                                      void (*fini)(Int  ) ) ;
4396 extern void vgPlain_details_name(Char *name ) ;   4396 extern void vgPlain_details_name(Char *name ) ;
4397 extern void vgPlain_details_version(Char *version ) ;   4397 extern void vgPlain_details_version(Char *version ) ;
4398 extern void vgPlain_details_description(Char *description ) ;   4398 extern void vgPlain_details_description(Char *description ) ;
4399 extern void vgPlain_details_copyright_author(Char *copyright_author ) ;   4399 extern void vgPlain_details_copyright_author(Char *copyright_author ) ;
4400 extern void vgPlain_details_avg_translation_sizeB(UInt size ) ;   4400 extern void vgPlain_details_avg_translation_sizeB(UInt size ) ;
4401 extern void vgPlain_details_bug_reports_to(Char *bug_reports_to ) ;   4401 extern void vgPlain_details_bug_reports_to(Char *bug_reports_to ) ;
4402 extern void vgPlain_needs_libc_freeres(void) ;   4402 extern void vgPlain_needs_libc_freeres(void) ;
4403 extern void vgPlain_needs_core_errors(void) ;   4403 extern void vgPlain_needs_core_errors(void) ;
4404 extern void vgPlain_needs_tool_errors(Bool (*eq_Error)(VgRes res , Error *e1 ,   4404 extern void vgPlain_needs_tool_errors(Bool (*eq_Error)(VgRes res , Error *e1 ,
4405                                                        Error *e2 ) ,   4405                                                        Error *e2 ) ,
4406                                       void (*before_pp_Error)(Error *err ) ,   4406                                       void (*before_pp_Error)(Error *err ) ,
4407                                       void (*pp_Error)(Error *err ) ,   4407                                       void (*pp_Error)(Error *err ) ,
4408                                       Bool show_ThreadIDs_for_errors ,   4408                                       Bool show_ThreadIDs_for_errors ,
4409                                       UInt (*update_extra)(Error *err ) ,   4409                                       UInt (*update_extra)(Error *err ) ,
4410                                       Bool (*recognised_suppression)(Char *name ,   4410                                       Bool (*recognised_suppression)(Char *name ,
4411                                                                      Supp *su ) ,   4411                                                                      Supp *su ) ,
4412                                       Bool (*read_extra_suppression_info)(Int fd ,   4412                                       Bool (*read_extra_suppression_info)(Int fd ,
4413                                                                           Char **bufpp ,   4413                                                                           Char **bufpp ,
4414                                                                           SizeT *nBufp ,   4414                                                                           SizeT *nBufp ,
4415                                                                           Supp *su ) ,   4415                                                                           Supp *su ) ,
4416                                       Bool (*error_matches_suppression)(Error *err ,   4416                                       Bool (*error_matches_suppression)(Error *err ,
4417                                                                         Supp *su ) ,   4417                                                                         Supp *su ) ,
4418                                       Char *(*get_error_name)(Error *err ) ,   4418                                       Char *(*get_error_name)(Error *err ) ,
4419                                       Bool (*print_extra_suppression_info)(Error *err ,   4419                                       Bool (*print_extra_suppression_info)(Error *err ,
4420                                                                            Char *buf ,   4420                                                                            Char *buf ,
4421                                                                            Int nBuf ) ) ;   4421                                                                            Int nBuf ) ) ;
4422 extern void vgPlain_needs_superblock_discards(void (*discard_superblock_info)(Addr64 orig_addr ,   4422 extern void vgPlain_needs_superblock_discards(void (*discard_superblock_info)(Addr64 orig_addr ,
4423                                                                               VexGuestExtents extents ) ) ;   4423                                                                               VexGuestExtents extents ) ) ;
4424 extern void vgPlain_needs_command_line_options(Bool (*process_cmd_line_option)(Char *argv ) ,   4424 extern void vgPlain_needs_command_line_options(Bool (*process_cmd_line_option)(Char *argv ) ,
4425                                                void (*print_usage)(void) ,   4425                                                void (*print_usage)(void) ,
4426                                                void (*print_debug_usage)(void) ) ;   4426                                                void (*print_debug_usage)(void) ) ;
4427 extern void vgPlain_needs_client_requests(Bool (*handle_client_request)(ThreadId tid ,   4427 extern void vgPlain_needs_client_requests(Bool (*handle_client_request)(ThreadId tid ,
4428                                                                         UWord *arg_block ,   4428                                                                         UWord *arg_block ,
4429                                                                         UWord *ret ) ) ;   4429                                                                         UWord *ret ) ) ;
4430 extern void vgPlain_needs_syscall_wrapper(void (*pre_syscall)(ThreadId tid ,   4430 extern void vgPlain_needs_syscall_wrapper(void (*pre_syscall)(ThreadId tid ,
4431                                                               UInt syscallno ,   4431                                                               UInt syscallno ,
4432                                                               UWord *args ,   4432                                                               UWord *args ,
4433                                                               UInt nArgs ) ,   4433                                                               UInt nArgs ) ,
4434                                           void (*post_syscall)(ThreadId tid ,   4434                                           void (*post_syscall)(ThreadId tid ,
4435                                                                UInt syscallno ,   4435                                                                UInt syscallno ,
4436                                                                UWord *args ,   4436                                                                UWord *args ,
4437                                                                UInt nArgs ,   4437                                                                UInt nArgs ,
4438                                                                SysRes res ) ) ;   4438                                                                SysRes res ) ) ;
4439 extern void vgPlain_needs_sanity_checks(Bool (*cheap_sanity_check)(void) ,   4439 extern void vgPlain_needs_sanity_checks(Bool (*cheap_sanity_check)(void) ,
4440                                         Bool (*expensive_sanity_check)(void) ) ;   4440                                         Bool (*expensive_sanity_check)(void) ) ;
4441 extern void vgPlain_needs_var_info(void) ;   4441 extern void vgPlain_needs_var_info(void) ;
4442 extern void vgPlain_needs_malloc_replacement(void *(*pmalloc)(ThreadId tid ,   4442 extern void vgPlain_needs_malloc_replacement(void *(*pmalloc)(ThreadId tid ,
4443                                                               SizeT n ) ,   4443                                                               SizeT n ) ,
4444                                              void *(*p__builtin_new)(ThreadId tid ,   4444                                              void *(*p__builtin_new)(ThreadId tid ,
4445                                                                      SizeT n ) ,   4445                                                                      SizeT n ) ,
4446                                              void *(*p__builtin_vec_new)(ThreadId tid ,   4446                                              void *(*p__builtin_vec_new)(ThreadId tid ,
4447                                                                          SizeT n ) ,   4447                                                                          SizeT n ) ,
4448                                              void *(*pmemalign)(ThreadId tid ,   4448                                              void *(*pmemalign)(ThreadId tid ,
4449                                                                 SizeT align ,   4449                                                                 SizeT align ,
4450                                                                 SizeT n ) ,   4450                                                                 SizeT n ) ,
4451                                              void *(*pcalloc)(ThreadId tid ,   4451                                              void *(*pcalloc)(ThreadId tid ,
4452                                                               SizeT nmemb ,   4452                                                               SizeT nmemb ,
4453                                                               SizeT size1 ) ,   4453                                                               SizeT size1 ) ,
4454                                              void (*pfree)(ThreadId tid ,   4454                                              void (*pfree)(ThreadId tid ,
4455                                                            void *p ) ,   4455                                                            void *p ) ,
4456                                              void (*p__builtin_delete)(ThreadId tid ,   4456                                              void (*p__builtin_delete)(ThreadId tid ,
4457                                                                        void *p ) ,   4457                                                                        void *p ) ,
4458                                              void (*p__builtin_vec_delete)(ThreadId tid ,   4458                                              void (*p__builtin_vec_delete)(ThreadId tid ,
4459                                                                            void *p ) ,   4459                                                                            void *p ) ,
4460                                              void *(*prealloc)(ThreadId tid ,   4460                                              void *(*prealloc)(ThreadId tid ,
4461                                                                void *p ,   4461                                                                void *p ,
4462                                                                SizeT new_size ) ,   4462                                                                SizeT new_size ) ,
4463                                              SizeT (*pmalloc_usable_size)(ThreadId tid ,   4463                                              SizeT (*pmalloc_usable_size)(ThreadId tid ,
4464                                                                           void *p ) ,   4464                                                                           void *p ) ,
4465                                              SizeT client_malloc_redzone_szB ) ;   4465                                              SizeT client_malloc_redzone_szB ) ;
4466 extern void vgPlain_needs_xml_output(void) ;   4466 extern void vgPlain_needs_xml_output(void) ;
4467 extern void vgPlain_needs_final_IR_tidy_pass(IRSB *(*final_tidy)(IRSB * ) ) ;   4467 extern void vgPlain_needs_final_IR_tidy_pass(IRSB *(*final_tidy)(IRSB * ) ) ;
4468 extern void vgPlain_track_new_mem_startup(void (*f)(Addr a , SizeT len ,   4468 extern void vgPlain_track_new_mem_startup(void (*f)(Addr a , SizeT len ,
4469                                                     Bool rr , Bool ww ,   4469                                                     Bool rr , Bool ww ,
4470                                                     Bool xx , ULong di_handle ) ) ;   4470                                                     Bool xx , ULong di_handle ) ) ;
4471 extern void vgPlain_track_new_mem_stack_signal(void (*f)(Addr a , SizeT len ,   4471 extern void vgPlain_track_new_mem_stack_signal(void (*f)(Addr a , SizeT len ,
4472                                                          ThreadId tid ) ) ;   4472                                                          ThreadId tid ) ) ;
4473 extern void vgPlain_track_new_mem_brk(void (*f)(Addr a , SizeT len ,   4473 extern void vgPlain_track_new_mem_brk(void (*f)(Addr a , SizeT len ,
4474                                                 ThreadId tid ) ) ;   4474                                                 ThreadId tid ) ) ;
4475 extern void vgPlain_track_new_mem_mmap(void (*f)(Addr a , SizeT len , Bool rr ,   4475 extern void vgPlain_track_new_mem_mmap(void (*f)(Addr a , SizeT len , Bool rr ,
4476                                                  Bool ww , Bool xx ,   4476                                                  Bool ww , Bool xx ,
4477                                                  ULong di_handle ) ) ;   4477                                                  ULong di_handle ) ) ;
4478 extern void vgPlain_track_copy_mem_remap(void (*f)(Addr from , Addr to ,   4478 extern void vgPlain_track_copy_mem_remap(void (*f)(Addr from , Addr to ,
4479                                                    SizeT len ) ) ;   4479                                                    SizeT len ) ) ;
4480 extern void vgPlain_track_change_mem_mprotect(void (*f)(Addr a , SizeT len ,   4480 extern void vgPlain_track_change_mem_mprotect(void (*f)(Addr a , SizeT len ,
4481                                                         Bool rr , Bool ww ,   4481                                                         Bool rr , Bool ww ,
4482                                                         Bool xx ) ) ;   4482                                                         Bool xx ) ) ;
4483 extern void vgPlain_track_die_mem_stack_signal(void (*f)(Addr a , SizeT len ) ) ;   4483 extern void vgPlain_track_die_mem_stack_signal(void (*f)(Addr a , SizeT len ) ) ;
4484 extern void vgPlain_track_die_mem_brk(void (*f)(Addr a , SizeT len ) ) ;   4484 extern void vgPlain_track_die_mem_brk(void (*f)(Addr a , SizeT len ) ) ;
4485 extern void vgPlain_track_die_mem_munmap(void (*f)(Addr a , SizeT len ) ) ;   4485 extern void vgPlain_track_die_mem_munmap(void (*f)(Addr a , SizeT len ) ) ;
4486 extern void vgPlain_track_new_mem_stack_4_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,   4486 extern void vgPlain_track_new_mem_stack_4_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,
4487                                                                                              UInt ecu ) ) ;   4487                                                                                              UInt ecu ) ) ;
4488 extern void vgPlain_track_new_mem_stack_8_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,   4488 extern void vgPlain_track_new_mem_stack_8_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,
4489                                                                                              UInt ecu ) ) ;   4489                                                                                              UInt ecu ) ) ;
4490 extern void vgPlain_track_new_mem_stack_12_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,   4490 extern void vgPlain_track_new_mem_stack_12_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,
4491                                                                                               UInt ecu ) ) ;   4491                                                                                               UInt ecu ) ) ;
4492 extern void vgPlain_track_new_mem_stack_16_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,   4492 extern void vgPlain_track_new_mem_stack_16_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,
4493                                                                                               UInt ecu ) ) ;   4493                                                                                               UInt ecu ) ) ;
4494 extern void vgPlain_track_new_mem_stack_32_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,   4494 extern void vgPlain_track_new_mem_stack_32_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,
4495                                                                                               UInt ecu ) ) ;   4495                                                                                               UInt ecu ) ) ;
4496 extern void vgPlain_track_new_mem_stack_112_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,   4496 extern void vgPlain_track_new_mem_stack_112_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,
4497                                                                                                UInt ecu ) ) ;   4497                                                                                                UInt ecu ) ) ;
4498 extern void vgPlain_track_new_mem_stack_128_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,   4498 extern void vgPlain_track_new_mem_stack_128_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,
4499                                                                                                UInt ecu ) ) ;   4499                                                                                                UInt ecu ) ) ;
4500 extern void vgPlain_track_new_mem_stack_144_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,   4500 extern void vgPlain_track_new_mem_stack_144_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,
4501                                                                                                UInt ecu ) ) ;   4501                                                                                                UInt ecu ) ) ;
4502 extern void vgPlain_track_new_mem_stack_160_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,   4502 extern void vgPlain_track_new_mem_stack_160_w_ECU(void ( __attribute__((__regparm__(2))) (*f))(Addr new_ESP ,
4503                                                                                                UInt ecu ) ) ;   4503                                                                                                UInt ecu ) ) ;
4504 extern void vgPlain_track_new_mem_stack_w_ECU(void (*f)(Addr a , SizeT len ,   4504 extern void vgPlain_track_new_mem_stack_w_ECU(void (*f)(Addr a , SizeT len ,
4505                                                         UInt ecu ) ) ;   4505                                                         UInt ecu ) ) ;
4506 extern void vgPlain_track_new_mem_stack_4(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;   4506 extern void vgPlain_track_new_mem_stack_4(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;
4507 extern void vgPlain_track_new_mem_stack_8(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;   4507 extern void vgPlain_track_new_mem_stack_8(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;
4508 extern void vgPlain_track_new_mem_stack_12(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;   4508 extern void vgPlain_track_new_mem_stack_12(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;
4509 extern void vgPlain_track_new_mem_stack_16(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;   4509 extern void vgPlain_track_new_mem_stack_16(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;
4510 extern void vgPlain_track_new_mem_stack_32(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;   4510 extern void vgPlain_track_new_mem_stack_32(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;
4511 extern void vgPlain_track_new_mem_stack_112(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;   4511 extern void vgPlain_track_new_mem_stack_112(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;
4512 extern void vgPlain_track_new_mem_stack_128(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;   4512 extern void vgPlain_track_new_mem_stack_128(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;
4513 extern void vgPlain_track_new_mem_stack_144(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;   4513 extern void vgPlain_track_new_mem_stack_144(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;
4514 extern void vgPlain_track_new_mem_stack_160(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;   4514 extern void vgPlain_track_new_mem_stack_160(void ( __attribute__((__regparm__(1))) (*f))(Addr new_ESP ) ) ;
4515 extern void vgPlain_track_new_mem_stack(void (*f)(Addr a , SizeT len ) ) ;   4515 extern void vgPlain_track_new_mem_stack(void (*f)(Addr a , SizeT len ) ) ;
4516 extern void vgPlain_track_die_mem_stack_4(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;   4516 extern void vgPlain_track_die_mem_stack_4(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;
4517 extern void vgPlain_track_die_mem_stack_8(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;   4517 extern void vgPlain_track_die_mem_stack_8(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;
4518 extern void vgPlain_track_die_mem_stack_12(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;   4518 extern void vgPlain_track_die_mem_stack_12(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;
4519 extern void vgPlain_track_die_mem_stack_16(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;   4519 extern void vgPlain_track_die_mem_stack_16(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;
4520 extern void vgPlain_track_die_mem_stack_32(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;   4520 extern void vgPlain_track_die_mem_stack_32(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;
4521 extern void vgPlain_track_die_mem_stack_112(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;   4521 extern void vgPlain_track_die_mem_stack_112(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;
4522 extern void vgPlain_track_die_mem_stack_128(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;   4522 extern void vgPlain_track_die_mem_stack_128(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;
4523 extern void vgPlain_track_die_mem_stack_144(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;   4523 extern void vgPlain_track_die_mem_stack_144(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;
4524 extern void vgPlain_track_die_mem_stack_160(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;   4524 extern void vgPlain_track_die_mem_stack_160(void ( __attribute__((__regparm__(1))) (*f))(Addr die_ESP ) ) ;
4525 extern void vgPlain_track_die_mem_stack(void (*f)(Addr a , SizeT len ) ) ;   4525 extern void vgPlain_track_die_mem_stack(void (*f)(Addr a , SizeT len ) ) ;
4526 extern void vgPlain_track_ban_mem_stack(void (*f)(Addr a , SizeT len ) ) ;   4526 extern void vgPlain_track_ban_mem_stack(void (*f)(Addr a , SizeT len ) ) ;
4527 extern void vgPlain_track_pre_mem_read(void (*f)(CorePart part , ThreadId tid ,   4527 extern void vgPlain_track_pre_mem_read(void (*f)(CorePart part , ThreadId tid ,
4528                                                  Char *s , Addr a , SizeT size ) ) ;   4528                                                  Char *s , Addr a , SizeT size ) ) ;
4529 extern void vgPlain_track_pre_mem_read_asciiz(void (*f)(CorePart part ,   4529 extern void vgPlain_track_pre_mem_read_asciiz(void (*f)(CorePart part ,
4530                                                         ThreadId tid , Char *s ,   4530                                                         ThreadId tid , Char *s ,
4531                                                         Addr a ) ) ;   4531                                                         Addr a ) ) ;
4532 extern void vgPlain_track_pre_mem_write(void (*f)(CorePart part , ThreadId tid ,   4532 extern void vgPlain_track_pre_mem_write(void (*f)(CorePart part , ThreadId tid ,
4533                                                   Char *s , Addr a , SizeT size ) ) ;   4533                                                   Char *s , Addr a , SizeT size ) ) ;
4534 extern void vgPlain_track_post_mem_write(void (*f)(CorePart part ,   4534 extern void vgPlain_track_post_mem_write(void (*f)(CorePart part ,
4535                                                    ThreadId tid , Addr a ,   4535                                                    ThreadId tid , Addr a ,
4536                                                    SizeT size ) ) ;   4536                                                    SizeT size ) ) ;
4537 extern void vgPlain_track_pre_reg_read(void (*f)(CorePart part , ThreadId tid ,   4537 extern void vgPlain_track_pre_reg_read(void (*f)(CorePart part , ThreadId tid ,
4538                                                  Char *s ,   4538                                                  Char *s ,
4539                                                  PtrdiffT guest_state_offset ,   4539                                                  PtrdiffT guest_state_offset ,
4540                                                  SizeT size ) ) ;   4540                                                  SizeT size ) ) ;
4541 extern void vgPlain_track_post_reg_write(void (*f)(CorePart part ,   4541 extern void vgPlain_track_post_reg_write(void (*f)(CorePart part ,
4542                                                    ThreadId tid ,   4542                                                    ThreadId tid ,
4543                                                    PtrdiffT guest_state_offset ,   4543                                                    PtrdiffT guest_state_offset ,
4544                                                    SizeT size ) ) ;   4544                                                    SizeT size ) ) ;
4545 extern void vgPlain_track_post_reg_write_clientcall_return(void (*f)(ThreadId tid ,   4545 extern void vgPlain_track_post_reg_write_clientcall_return(void (*f)(ThreadId tid ,
4546                                                                      PtrdiffT guest_state_offset ,   4546                                                                      PtrdiffT guest_state_offset ,
4547                                                                      SizeT size ,   4547                                                                      SizeT size ,
4548                                                                      Addr f ) ) ;   4548                                                                      Addr f ) ) ;
4549 extern void vgPlain_track_start_client_code(void (*f)(ThreadId tid ,   4549 extern void vgPlain_track_start_client_code(void (*f)(ThreadId tid ,
4550                                                       ULong blocks_dispatched ) ) ;   4550                                                       ULong blocks_dispatched ) ) ;
4551 extern void vgPlain_track_stop_client_code(void (*f)(ThreadId tid ,   4551 extern void vgPlain_track_stop_client_code(void (*f)(ThreadId tid ,
4552                                                      ULong blocks_dispatched ) ) ;   4552                                                      ULong blocks_dispatched ) ) ;
4553 extern void vgPlain_track_pre_thread_ll_create(void (*f)(ThreadId tid ,   4553 extern void vgPlain_track_pre_thread_ll_create(void (*f)(ThreadId tid ,
4554                                                          ThreadId child ) ) ;   4554                                                          ThreadId child ) ) ;
4555 extern void vgPlain_track_pre_thread_first_insn(void (*f)(ThreadId tid ) ) ;   4555 extern void vgPlain_track_pre_thread_first_insn(void (*f)(ThreadId tid ) ) ;
4556 extern void vgPlain_track_pre_thread_ll_exit(void (*f)(ThreadId tid ) ) ;   4556 extern void vgPlain_track_pre_thread_ll_exit(void (*f)(ThreadId tid ) ) ;
4557 extern void vgPlain_track_pre_deliver_signal(void (*f)(ThreadId tid ,   4557 extern void vgPlain_track_pre_deliver_signal(void (*f)(ThreadId tid ,
4558                                                        Int sigNo ,   4558                                                        Int sigNo ,
4559                                                        Bool alt_stack ) ) ;   4559                                                        Bool alt_stack ) ) ;
4560 extern void vgPlain_track_post_deliver_signal(void (*f)(ThreadId tid ,   4560 extern void vgPlain_track_post_deliver_signal(void (*f)(ThreadId tid ,
4561                                                         Int sigNo ) ) ;   4561                                                         Int sigNo ) ) ;
4562 extern VgDetails vgPlain_details ;   4562 extern VgDetails vgPlain_details ;
4563 extern VgNeeds vgPlain_needs ;   4563 extern VgNeeds vgPlain_needs ;
4564 extern VgToolInterface vgPlain_tdict ;   4564 extern VgToolInterface vgPlain_tdict ;
4565 extern Bool vgPlain_sanity_check_needs(Char **failmsg ) ;   4565 extern Bool vgPlain_sanity_check_needs(Char **failmsg ) ;
4566 extern Bool vgPlain_translate(ThreadId tid , Addr64 orig_addr ,   4566 extern Bool vgPlain_translate(ThreadId tid , Addr64 orig_addr ,
4567                               Bool debugging_translation ,   4567                               Bool debugging_translation ,
4568                               Int debugging_verbosity , ULong bbs_done ,   4568                               Int debugging_verbosity , ULong bbs_done ,
4569                               Bool allow_redirection ) ;   4569                               Bool allow_redirection ) ;
4570 extern void vgPlain_print_translation_stats(void) ;   4570 extern void vgPlain_print_translation_stats(void) ;
4571 extern FastCacheEntry __attribute__((__aligned__(16)))  vgPlain_tt_fast[1 << 15] ;   4571 extern FastCacheEntry __attribute__((__aligned__(16)))  vgPlain_tt_fast[1 << 15] ;
4572 extern UInt *vgPlain_tt_fastN[1 << 15] ;   4572 extern UInt *vgPlain_tt_fastN[1 << 15] ;
4573 extern void vgPlain_init_tt_tc(void) ;   4573 extern void vgPlain_init_tt_tc(void) ;
4574 extern void vgPlain_add_to_transtab(VexGuestExtents *vge , Addr64 entry ,   4574 extern void vgPlain_add_to_transtab(VexGuestExtents *vge , Addr64 entry ,
4575                                     AddrH code , UInt code_len ,   4575                                     AddrH code , UInt code_len ,
4576                                     Bool is_self_checking ) ;   4576                                     Bool is_self_checking ) ;
4577 extern Bool vgPlain_search_transtab(AddrH *result , Addr64 guest_addr ,   4577 extern Bool vgPlain_search_transtab(AddrH *result , Addr64 guest_addr ,
4578                                     Bool upd_cache ) ;   4578                                     Bool upd_cache ) ;
4579 extern void vgPlain_discard_translations(Addr64 start , ULong range ,   4579 extern void vgPlain_discard_translations(Addr64 start , ULong range ,
4580                                          HChar *who ) ;   4580                                          HChar *who ) ;
4581 extern void vgPlain_print_tt_tc_stats(void) ;   4581 extern void vgPlain_print_tt_tc_stats(void) ;
4582 extern UInt vgPlain_get_bbs_translated(void) ;   4582 extern UInt vgPlain_get_bbs_translated(void) ;
4583 extern void vgPlain_add_to_unredir_transtab(VexGuestExtents *vge ,   4583 extern void vgPlain_add_to_unredir_transtab(VexGuestExtents *vge ,
4584                                             Addr64 entry , AddrH code ,   4584                                             Addr64 entry , AddrH code ,
4585                                             UInt code_len ) ;   4585                                             UInt code_len ) ;
4586 extern Bool vgPlain_search_unredir_transtab(AddrH *result , Addr64 guest_addr ) ;   4586 extern Bool vgPlain_search_unredir_transtab(AddrH *result , Addr64 guest_addr ) ;
4587 extern ULong vgPlain_get_BB_profile(BBProfEntry *tops , UInt n_tops ) ;   4587 extern ULong vgPlain_get_BB_profile(BBProfEntry *tops , UInt n_tops ) ;
4588 extern Bool vgPlain_get_filename(Addr a , Char *filename , Int n_filename ) ;   4588 extern Bool vgPlain_get_filename(Addr a , Char *filename , Int n_filename ) ;
4589 extern Bool vgPlain_get_fnname(Addr a , Char *fnname , Int n_fnname ) ;   4589 extern Bool vgPlain_get_fnname(Addr a , Char *fnname , Int n_fnname ) ;
4590 extern Bool vgPlain_get_linenum(Addr a , UInt *linenum ) ;   4590 extern Bool vgPlain_get_linenum(Addr a , UInt *linenum ) ;
4591 extern Bool vgPlain_get_fnname_w_offset(Addr a , Char *fnname , Int n_fnname ) ;   4591 extern Bool vgPlain_get_fnname_w_offset(Addr a , Char *fnname , Int n_fnname ) ;
4592 extern Bool vgPlain_get_filename_linenum(Addr a , Char *filename ,   4592 extern Bool vgPlain_get_filename_linenum(Addr a , Char *filename ,
4593                                          Int n_filename , Char *dirname ,   4593                                          Int n_filename , Char *dirname ,
4594                                          Int n_dirname ,   4594                                          Int n_dirname ,
4595                                          Bool *dirname_available ,   4595                                          Bool *dirname_available ,
4596                                          UInt *linenum ) ;   4596                                          UInt *linenum ) ;
4597 extern Bool vgPlain_get_fnname_if_entry(Addr a , Char *fnname , Int n_fnname ) ;   4597 extern Bool vgPlain_get_fnname_if_entry(Addr a , Char *fnname , Int n_fnname ) ;
4598 extern Vg_FnNameKind vgPlain_get_fnname_kind(Char *name ) ;   4598 extern Vg_FnNameKind vgPlain_get_fnname_kind(Char *name ) ;
4599 extern Vg_FnNameKind vgPlain_get_fnname_kind_from_IP(Addr ip ) ;   4599 extern Vg_FnNameKind vgPlain_get_fnname_kind_from_IP(Addr ip ) ;
4600 extern Bool vgPlain_get_datasym_and_offset(Addr data_addr , Char *dname ,   4600 extern Bool vgPlain_get_datasym_and_offset(Addr data_addr , Char *dname ,
4601                                            Int n_dname , PtrdiffT *offset ) ;   4601                                            Int n_dname , PtrdiffT *offset ) ;
4602 extern Bool vgPlain_get_data_description(void *dname1v , void *dname2v ,   4602 extern Bool vgPlain_get_data_description(void *dname1v , void *dname2v ,
4603                                          Addr data_addr ) ;   4603                                          Addr data_addr ) ;
4604 extern Bool vgPlain_get_objname(Addr a , Char *objname , Int n_objname ) ;   4604 extern Bool vgPlain_get_objname(Addr a , Char *objname , Int n_objname ) ;
4605 extern Char *vgPlain_describe_IP(Addr eip , Char *buf , Int n_buf ) ;   4605 extern Char *vgPlain_describe_IP(Addr eip , Char *buf , Int n_buf ) ;
4606 extern void *vgPlain_di_get_stack_blocks_at_ip(Addr ip , Bool arrays_only ) ;   4606 extern void *vgPlain_di_get_stack_blocks_at_ip(Addr ip , Bool arrays_only ) ;
4607 extern void *vgPlain_di_get_global_blocks_from_dihandle(ULong di_handle ,   4607 extern void *vgPlain_di_get_global_blocks_from_dihandle(ULong di_handle ,
4608                                                         Bool arrays_only ) ;   4608                                                         Bool arrays_only ) ;
4609 extern DebugInfo *vgPlain_find_DebugInfo(Addr a ) ;   4609 extern DebugInfo *vgPlain_find_DebugInfo(Addr a ) ;
4610 extern Addr vgPlain_DebugInfo_get_text_avma(DebugInfo const   *di ) ;   4610 extern Addr vgPlain_DebugInfo_get_text_avma(DebugInfo const   *di ) ;
4611 extern SizeT vgPlain_DebugInfo_get_text_size(DebugInfo const   *di ) ;   4611 extern SizeT vgPlain_DebugInfo_get_text_size(DebugInfo const   *di ) ;
4612 extern Addr vgPlain_DebugInfo_get_plt_avma(DebugInfo const   *di ) ;   4612 extern Addr vgPlain_DebugInfo_get_plt_avma(DebugInfo const   *di ) ;
4613 extern SizeT vgPlain_DebugInfo_get_plt_size(DebugInfo const   *di ) ;   4613 extern SizeT vgPlain_DebugInfo_get_plt_size(DebugInfo const   *di ) ;
4614 extern Addr vgPlain_DebugInfo_get_gotplt_avma(DebugInfo const   *di ) ;   4614 extern Addr vgPlain_DebugInfo_get_gotplt_avma(DebugInfo const   *di ) ;
4615 extern SizeT vgPlain_DebugInfo_get_gotplt_size(DebugInfo const   *di ) ;   4615 extern SizeT vgPlain_DebugInfo_get_gotplt_size(DebugInfo const   *di ) ;
4616 extern UChar const   *vgPlain_DebugInfo_get_soname(DebugInfo const   *di ) ;   4616 extern UChar const   *vgPlain_DebugInfo_get_soname(DebugInfo const   *di ) ;
4617 extern UChar const   *vgPlain_DebugInfo_get_filename(DebugInfo const   *di ) ;   4617 extern UChar const   *vgPlain_DebugInfo_get_filename(DebugInfo const   *di ) ;
4618 extern PtrdiffT vgPlain_DebugInfo_get_text_bias(DebugInfo const   *di ) ;   4618 extern PtrdiffT vgPlain_DebugInfo_get_text_bias(DebugInfo const   *di ) ;
4619 extern DebugInfo const   *vgPlain_next_DebugInfo(DebugInfo const   *di ) ;   4619 extern DebugInfo const   *vgPlain_next_DebugInfo(DebugInfo const   *di ) ;
4620 extern Int vgPlain_DebugInfo_syms_howmany(DebugInfo const   *di ) ;   4620 extern Int vgPlain_DebugInfo_syms_howmany(DebugInfo const   *di ) ;
4621 extern void vgPlain_DebugInfo_syms_getidx(DebugInfo const   *di , Int idx ,   4621 extern void vgPlain_DebugInfo_syms_getidx(DebugInfo const   *di , Int idx ,
4622                                           Addr *avma , Addr *tocptr ,   4622                                           Addr *avma , Addr *tocptr ,
4623                                           UInt *size , HChar **name ,   4623                                           UInt *size , HChar **name ,
4624                                           Bool *isText , Bool *isIFunc ) ;   4624                                           Bool *isText , Bool *isIFunc ) ;
4625 extern HChar const   *vgPlain_pp_SectKind(VgSectKind kind ) ;   4625 extern HChar const   *vgPlain_pp_SectKind(VgSectKind kind ) ;
4626 extern VgSectKind vgPlain_DebugInfo_sect_kind(UChar *name , SizeT n_name ,   4626 extern VgSectKind vgPlain_DebugInfo_sect_kind(UChar *name , SizeT n_name ,
4627                                               Addr a ) ;   4627                                               Addr a ) ;
4628 extern void vgPlain_di_initialise(void) ;   4628 extern void vgPlain_di_initialise(void) ;
4629 extern ULong vgPlain_di_notify_mmap(Addr a , Bool allow_SkFileV ) ;   4629 extern ULong vgPlain_di_notify_mmap(Addr a , Bool allow_SkFileV ) ;
4630 extern void vgPlain_di_notify_munmap(Addr a , SizeT len ) ;   4630 extern void vgPlain_di_notify_munmap(Addr a , SizeT len ) ;
4631 extern void vgPlain_di_notify_mprotect(Addr a , SizeT len , UInt prot ) ;   4631 extern void vgPlain_di_notify_mprotect(Addr a , SizeT len , UInt prot ) ;
4632 extern void vgPlain_di_notify_pdb_debuginfo(Int fd , Addr avma ,   4632 extern void vgPlain_di_notify_pdb_debuginfo(Int fd , Addr avma ,
4633                                             SizeT total_size ,   4633                                             SizeT total_size ,
4634                                             PtrdiffT unknown_purpose__reloc ) ;   4634                                             PtrdiffT unknown_purpose__reloc ) ;
4635 extern void vgPlain_di_discard_ALL_debuginfo(void) ;   4635 extern void vgPlain_di_discard_ALL_debuginfo(void) ;
4636 extern Bool vgPlain_get_fnname_raw(Addr a , Char *buf , Int nbuf ) ;   4636 extern Bool vgPlain_get_fnname_raw(Addr a , Char *buf , Int nbuf ) ;
4637 extern Bool vgPlain_get_fnname_no_cxx_demangle(Addr a , Char *buf , Int nbuf ) ;   4637 extern Bool vgPlain_get_fnname_no_cxx_demangle(Addr a , Char *buf , Int nbuf ) ;
4638 extern Bool vgPlain_use_CF_info(D3UnwindRegs *uregs , Addr min_accessible ,   4638 extern Bool vgPlain_use_CF_info(D3UnwindRegs *uregs , Addr min_accessible ,
4639                                 Addr max_accessible ) ;   4639                                 Addr max_accessible ) ;
4640 extern Bool vgPlain_use_FPO_info(Addr *ipP , Addr *spP , Addr *fpP ,   4640 extern Bool vgPlain_use_FPO_info(Addr *ipP , Addr *spP , Addr *fpP ,
4641                                  Addr min_accessible , Addr max_accessible ) ;   4641                                  Addr min_accessible , Addr max_accessible ) ;
4642 extern Addr vgPlain_get_tocptr(Addr guest_code_addr ) ;   4642 extern Addr vgPlain_get_tocptr(Addr guest_code_addr ) ;
4643 extern Bool vgPlain_lookup_symbol_SLOW(UChar *sopatt , UChar *name ,   4643 extern Bool vgPlain_lookup_symbol_SLOW(UChar *sopatt , UChar *name ,
4644                                        Addr *pEnt , Addr *pToc ) ;   4644                                        Addr *pEnt , Addr *pToc ) ;
4645 extern void vgModuleLocal_sema_init(vg_sema_t *sema ) ;   4645 extern void vgModuleLocal_sema_init(vg_sema_t *sema ) ;
4646 extern void vgModuleLocal_sema_deinit(vg_sema_t *sema ) ;   4646 extern void vgModuleLocal_sema_deinit(vg_sema_t *sema ) ;
4647 extern void vgModuleLocal_sema_down(vg_sema_t *sema , Bool as_LL ) ;   4647 extern void vgModuleLocal_sema_down(vg_sema_t *sema , Bool as_LL ) ;
4648 extern void vgModuleLocal_sema_up(vg_sema_t *sema , Bool as_LL ) ;   4648 extern void vgModuleLocal_sema_up(vg_sema_t *sema , Bool as_LL ) ;
4649 ThreadId vgPlain_alloc_ThreadState(void) ;   4649 ThreadId vgPlain_alloc_ThreadState(void) ;
4650 void vgPlain_exit_thread(ThreadId tid ) ;   4650 void vgPlain_exit_thread(ThreadId tid ) ;
4651 void vgPlain_get_thread_out_of_syscall(ThreadId tid ) ;   4651 void vgPlain_get_thread_out_of_syscall(ThreadId tid ) ;
4652 void vgPlain_nuke_all_threads_except(ThreadId me , VgSchedReturnCode src ) ;   4652 void vgPlain_nuke_all_threads_except(ThreadId me , VgSchedReturnCode src ) ;
4653 void vgPlain_acquire_BigLock(ThreadId tid , HChar *who ) ;   4653 void vgPlain_acquire_BigLock(ThreadId tid , HChar *who ) ;
4654 void vgPlain_acquire_BigLock_LL(HChar *who ) ;   4654 void vgPlain_acquire_BigLock_LL(HChar *who ) ;
4655 void vgPlain_release_BigLock(ThreadId tid , ThreadStatus sleepstate ,   4655 void vgPlain_release_BigLock(ThreadId tid , ThreadStatus sleepstate ,
4656                              HChar *who ) ;   4656                              HChar *who ) ;
4657 void vgPlain_release_BigLock_LL(HChar *who ) ;   4657 void vgPlain_release_BigLock_LL(HChar *who ) ;
4658 void vgPlain_vg_yield(void) ;   4658 void vgPlain_vg_yield(void) ;
4659 VgSchedReturnCode vgPlain_scheduler(ThreadId tid ) ;   4659 VgSchedReturnCode vgPlain_scheduler(ThreadId tid ) ;
4660 ThreadId vgPlain_scheduler_init_phase1(void) ;   4660 ThreadId vgPlain_scheduler_init_phase1(void) ;
4661 void vgPlain_scheduler_init_phase2(ThreadId tid_main , Addr clstack_end ,   4661 void vgPlain_scheduler_init_phase2(ThreadId tid_main , Addr clstack_end ,
4662                                    SizeT clstack_size ) ;   4662                                    SizeT clstack_size ) ;
4663 void vgPlain_disable_vgdb_poll(void) ;   4663 void vgPlain_disable_vgdb_poll(void) ;
4664 void vgPlain_force_vgdb_poll(void) ;   4664 void vgPlain_force_vgdb_poll(void) ;
4665 ULong vgPlain_bbs_done(void) ;   4665 ULong vgPlain_bbs_done(void) ;
4666 void vgPlain_print_scheduler_stats(void) ;   4666 void vgPlain_print_scheduler_stats(void) ;
4667 Bool vgPlain_in_generated_code ;   4667 Bool vgPlain_in_generated_code ;
4668 void vgPlain_sanity_check_general(Bool force_expensive ) ;   4668 void vgPlain_sanity_check_general(Bool force_expensive ) ;
4669 extern void vgPlain_redir_notify_new_DebugInfo(DebugInfo * ) ;   4669 extern void vgPlain_redir_notify_new_DebugInfo(DebugInfo * ) ;
4670 extern void vgPlain_redir_notify_delete_DebugInfo(DebugInfo * ) ;   4670 extern void vgPlain_redir_notify_delete_DebugInfo(DebugInfo * ) ;
4671 extern void vgPlain_redir_initialise(void) ;   4671 extern void vgPlain_redir_initialise(void) ;
4672 extern void vgPlain_redir_add_ifunc_target(Addr old_from , Addr new_from ) ;   4672 extern void vgPlain_redir_add_ifunc_target(Addr old_from , Addr new_from ) ;
4673 extern Addr vgPlain_redir_do_lookup(Addr orig , Bool *isWrap ) ;   4673 extern Addr vgPlain_redir_do_lookup(Addr orig , Bool *isWrap ) ;
4674 Bool vgPlain_in_generated_code  =    (Bool )0;   4674 Bool vgPlain_in_generated_code  =    (Bool )0;
4675 UInt vgPlain_dispatch_ctr  ;   4675 UInt vgPlain_dispatch_ctr  ;
4676 static ULong bbs_done  =    (ULong )0;   4676 static ULong bbs_done  =    (ULong )0;
4677 static ULong vgdb_next_poll  ;   4677 static ULong vgdb_next_poll  ;
4678 static void do_client_request(ThreadId tid ) ;   4678 static void do_client_request(ThreadId tid ) ;
4679 static void scheduler_sanity(ThreadId tid ) ;   4679 static void scheduler_sanity(ThreadId tid ) ;
4680 static void mostly_clear_thread_record(ThreadId tid ) ;   4680 static void mostly_clear_thread_record(ThreadId tid ) ;
4681 static ULong n_scheduling_events_MINOR  =    (ULong )0;   4681 static ULong n_scheduling_events_MINOR  =    (ULong )0;
4682 static ULong n_scheduling_events_MAJOR  =    (ULong )0;   4682 static ULong n_scheduling_events_MAJOR  =    (ULong )0;
4683 static UInt sanity_fast_count  =    (UInt )0;   4683 static UInt sanity_fast_count  =    (UInt )0;
4684 static UInt sanity_slow_count  =    (UInt )0;   4684 static UInt sanity_slow_count  =    (UInt )0;
4685 void vgPlain_print_scheduler_stats(void)   4685 void vgPlain_print_scheduler_stats(void)
4686 {   4686 {
4687     4687  
4688     4688  
4689   {   4689   {
4690   vgPlain_message((VgMsgKind )2, "scheduler: %\'llu jumps (bb entries).\n",   4690   vgPlain_message((VgMsgKind )2, "scheduler: %\'llu jumps (bb entries).\n",
4691                   bbs_done);   4691                   bbs_done);
4692   vgPlain_message((VgMsgKind )2,   4692   vgPlain_message((VgMsgKind )2,
4693                   "scheduler: %\'llu/%\'llu major/minor sched events.\n",   4693                   "scheduler: %\'llu/%\'llu major/minor sched events.\n",
4694                   n_scheduling_events_MAJOR, n_scheduling_events_MINOR);   4694                   n_scheduling_events_MAJOR, n_scheduling_events_MINOR);
4695   vgPlain_message((VgMsgKind )2, "   sanity: %d cheap, %d expensive checks.\n",   4695   vgPlain_message((VgMsgKind )2, "   sanity: %d cheap, %d expensive checks.\n",
4696                   sanity_fast_count, sanity_slow_count);   4696                   sanity_fast_count, sanity_slow_count);
4697   return;   4697   return;
4698 }   4698 }
4699 }   4699 }
4700 static vg_sema_t the_BigLock  ;   4700 static vg_sema_t the_BigLock  ;
4701 static void print_sched_event(ThreadId tid , Char *what )   4701 static void print_sched_event(ThreadId tid , Char *what )
4702 {   4702 {
4703     4703  
4704     4704  
4705   {   4705   {
4706   vgPlain_message((VgMsgKind )2, "  SCHED[%d]: %s\n", tid, what);   4706   vgPlain_message((VgMsgKind )2, "  SCHED[%d]: %s\n", tid, what);
4707   return;   4707   return;
4708 }   4708 }
4709 }   4709 }
4710 static HChar *name_of_sched_event(UInt event )   4710 static HChar *name_of_sched_event(UInt event )
4711 {   4711 {
4712     4712  
4713     4713  
4714   {   4714   {
4715   switch (event) {   4715   switch (event) {
4716   case 73U:   4716   case 73U:
4717   return ((HChar *)"SYSCALL");   4717   return ((HChar *)"SYSCALL");
4718   case 75U:   4718   case 75U:
4719   return ((HChar *)"INT32");   4719   return ((HChar *)"INT32");
4720   case 77U:   4720   case 77U:
4721   return ((HChar *)"INT128");   4721   return ((HChar *)"INT128");
4722   case 89U:   4722   case 89U:
4723   return ((HChar *)"INT129");   4723   return ((HChar *)"INT129");
4724   case 91U:   4724   case 91U:
4725   return ((HChar *)"INT130");   4725   return ((HChar *)"INT130");
4726   case 79U:   4726   case 79U:
4727   return ((HChar *)"SYSENTER");   4727   return ((HChar *)"SYSENTER");
4728   case 65U:   4728   case 65U:
4729   return ((HChar *)"CLIENTREQ");   4729   return ((HChar *)"CLIENTREQ");
4730   case 67U:   4730   case 67U:
4731   return ((HChar *)"YIELD");   4731   return ((HChar *)"YIELD");
4732   case 69U:   4732   case 69U:
4733   return ((HChar *)"NODECODE");   4733   return ((HChar *)"NODECODE");
4734   case 71U:   4734   case 71U:
4735   return ((HChar *)"MAPFAIL");   4735   return ((HChar *)"MAPFAIL");
4736   case 81U:   4736   case 81U:
4737   return ((HChar *)"NOREDIR");   4737   return ((HChar *)"NOREDIR");
4738   case 63U:   4738   case 63U:
4739   return ((HChar *)"EMWARN");   4739   return ((HChar *)"EMWARN");
4740   case 61U:   4740   case 61U:
4741   return ((HChar *)"TINVAL");   4741   return ((HChar *)"TINVAL");
4742   case 47U:   4742   case 47U:
4743   return ((HChar *)"INVFAILED");   4743   return ((HChar *)"INVFAILED");
4744   case 41U:   4744   case 41U:
4745   return ((HChar *)"COUNTERZERO");   4745   return ((HChar *)"COUNTERZERO");
4746   case 37U:   4746   case 37U:
4747   return ((HChar *)"FASTMISS");   4747   return ((HChar *)"FASTMISS");
4748   case 43U:   4748   case 43U:
4749   return ((HChar *)"FAULTSIGNAL");   4749   return ((HChar *)"FAULTSIGNAL");
4750   default:   4750   default:
4751   return ((HChar *)"??UNKNOWN??");   4751   return ((HChar *)"??UNKNOWN??");
4752   }   4752   }
4753 }   4753 }
4754 }   4754 }
4755 ThreadId vgPlain_alloc_ThreadState(void)   4755 ThreadId vgPlain_alloc_ThreadState(void)
4756 {   4756 {
4757   Int i ;   4757   Int i ;
4758     4758  
4759   {   4759   {
4760   i = 1;   4760   i = 1;
4761   while (i < 500) {   4761   while (i < 500) {
4762     if ((unsigned int )vgPlain_threads[i].status == 0U) {   4762     if ((unsigned int )vgPlain_threads[i].status == 0U) {
4763       vgPlain_threads[i].status = (ThreadStatus )1;   4763       vgPlain_threads[i].status = (ThreadStatus )1;
4764       vgPlain_threads[i].exitreason = (VgSchedReturnCode )0;   4764       vgPlain_threads[i].exitreason = (VgSchedReturnCode )0;
4765       return ((ThreadId )i);   4765       return ((ThreadId )i);
4766     } else {   4766     } else {
4767     4767  
4768     }   4768     }
4769     i ++;   4769     i ++;
4770   }   4770   }
4771   vgPlain_printf("vg_alloc_ThreadState: no free slots available\n");   4771   vgPlain_printf("vg_alloc_ThreadState: no free slots available\n");
4772   vgPlain_printf("Increase VG_N_THREADS, rebuild and try again.\n");   4772   vgPlain_printf("Increase VG_N_THREADS, rebuild and try again.\n");
4773   vgPlain_core_panic((Char *)"VG_N_THREADS is too low");   4773   vgPlain_core_panic((Char *)"VG_N_THREADS is too low");
4774 }   4774 }
4775 }   4775 }
4776 void vgPlain_acquire_BigLock(ThreadId tid , HChar *who )   4776 void vgPlain_acquire_BigLock(ThreadId tid , HChar *who )
4777 {   4777 {
4778   ThreadState *tst ;   4778   ThreadState *tst ;
4779   long tmp ;   4779   long tmp ;
4780   long tmp___0 ;   4780   long tmp___0 ;
4781   Addr gsp ;   4781   Addr gsp ;
4782   Addr tmp___1 ;   4782   Addr tmp___1 ;
4783   HChar buf[150] ;   4783   HChar buf[150] ;
4784   SizeT tmp___2 ;   4784   SizeT tmp___2 ;
4785   int tmp___3 ;   4785   int tmp___3 ;
4786   long tmp___4 ;   4786   long tmp___4 ;
4787     4787  
4788   {   4788   {
4789   vgModuleLocal_sema_down(& the_BigLock, (Bool )0);   4789   vgModuleLocal_sema_down(& the_BigLock, (Bool )0);
4790   tst = vgPlain_get_ThreadState(tid);   4790   tst = vgPlain_get_ThreadState(tid);
4791   tmp = __builtin_expect((long )(! (! ((unsigned int )tst->status != 2U))), 1L);   4791   tmp = __builtin_expect((long )(! (! ((unsigned int )tst->status != 2U))), 1L);
4792   if (tmp) {   4792   if (tmp) {
4793     4793  
4794   } else {   4794   } else {
4795     vgPlain_assert_fail((Bool )1,   4795     vgPlain_assert_fail((Bool )1,
4796                         (Char const   *)"tst->status != VgTs_Runnable",   4796                         (Char const   *)"tst->status != VgTs_Runnable",
4797                         (Char const   *)"m_scheduler/scheduler.c", 233,   4797                         (Char const   *)"m_scheduler/scheduler.c", 233,
4798                         (Char const   *)"vgPlain_acquire_BigLock", "");   4798                         (Char const   *)"vgPlain_acquire_BigLock", "");
4799   }   4799   }
4800   tst->status = (ThreadStatus )2;   4800   tst->status = (ThreadStatus )2;
4801   if (vgPlain_running_tid != 0U) {   4801   if (vgPlain_running_tid != 0U) {
4802     vgPlain_printf("tid %d found %d running\n", tid, vgPlain_running_tid);   4802     vgPlain_printf("tid %d found %d running\n", tid, vgPlain_running_tid);
4803   } else {   4803   } else {
4804     4804  
4805   }   4805   }
4806   tmp___0 = __builtin_expect((long )(! (! (vgPlain_running_tid == 0U))), 1L);   4806   tmp___0 = __builtin_expect((long )(! (! (vgPlain_running_tid == 0U))), 1L);
4807   if (tmp___0) {   4807   if (tmp___0) {
4808     4808  
4809   } else {   4809   } else {
4810     vgPlain_assert_fail((Bool )1,   4810     vgPlain_assert_fail((Bool )1,
4811                         (Char const   *)"VG_(running_tid) == VG_INVALID_THREADID",   4811                         (Char const   *)"VG_(running_tid) == VG_INVALID_THREADID",
4812                         (Char const   *)"m_scheduler/scheduler.c", 239,   4812                         (Char const   *)"m_scheduler/scheduler.c", 239,
4813                         (Char const   *)"vgPlain_acquire_BigLock", "");   4813                         (Char const   *)"vgPlain_acquire_BigLock", "");
4814   }   4814   }
4815   vgPlain_running_tid = tid;   4815   vgPlain_running_tid = tid;
4816   tmp___1 = vgPlain_get_SP(tid);   4816   tmp___1 = vgPlain_get_SP(tid);
4817   gsp = tmp___1;   4817   gsp = tmp___1;
4818   vgPlain_unknown_SP_update(gsp, gsp, (UInt )0);   4818   vgPlain_unknown_SP_update(gsp, gsp, (UInt )0);
4819   if (vgPlain_clo_trace_sched) {   4819   if (vgPlain_clo_trace_sched) {
4820     tmp___2 = vgPlain_strlen((Char const   *)who);   4820     tmp___2 = vgPlain_strlen((Char const   *)who);
4821     if (tmp___2 <= 100UL) {   4821     if (tmp___2 <= 100UL) {
4822       tmp___3 = 1;   4822       tmp___3 = 1;
4823     } else {   4823     } else {
4824       tmp___3 = 0;   4824       tmp___3 = 0;
4825     }   4825     }
4826     tmp___4 = __builtin_expect((long )tmp___3, 1L);   4826     tmp___4 = __builtin_expect((long )tmp___3, 1L);
4827     if (tmp___4) {   4827     if (tmp___4) {
4828     4828  
4829     } else {   4829     } else {
4830       vgPlain_assert_fail((Bool )1,   4830       vgPlain_assert_fail((Bool )1,
4831                           (Char const   *)"VG_(strlen)(who) <= 150-50",   4831                           (Char const   *)"VG_(strlen)(who) <= 150-50",
4832                           (Char const   *)"m_scheduler/scheduler.c", 248,   4832                           (Char const   *)"m_scheduler/scheduler.c", 248,
4833                           (Char const   *)"vgPlain_acquire_BigLock", "");   4833                           (Char const   *)"vgPlain_acquire_BigLock", "");
4834     }   4834     }
4835     vgPlain_sprintf((Char *)(buf), " acquired lock (%s)", who);   4835     vgPlain_sprintf((Char *)(buf), " acquired lock (%s)", who);
4836     print_sched_event(tid, (Char *)(buf));   4836     print_sched_event(tid, (Char *)(buf));
4837   } else {   4837   } else {
4838     4838  
4839   }   4839   }
4840   return;   4840   return;
4841 }   4841 }
4842 }   4842 }
4843 void vgPlain_release_BigLock(ThreadId tid , ThreadStatus sleepstate ,   4843 void vgPlain_release_BigLock(ThreadId tid , ThreadStatus sleepstate ,
4844                              HChar *who )   4844                              HChar *who )
4845 {   4845 {
4846   ThreadState *tst ;   4846   ThreadState *tst ;
4847   ThreadState *tmp ;   4847   ThreadState *tmp ;
4848   long tmp___0 ;   4848   long tmp___0 ;
4849   int tmp___1 ;   4849   int tmp___1 ;
4850   long tmp___2 ;   4850   long tmp___2 ;
4851   long tmp___3 ;   4851   long tmp___3 ;
4852   Char buf[200] ;   4852   Char buf[200] ;
4853   SizeT tmp___4 ;   4853   SizeT tmp___4 ;
4854   int tmp___5 ;   4854   int tmp___5 ;
4855   long tmp___6 ;   4855   long tmp___6 ;
4856   HChar const   *tmp___7 ;   4856   HChar const   *tmp___7 ;
4857     4857  
4858   {   4858   {
4859   tmp = vgPlain_get_ThreadState(tid);   4859   tmp = vgPlain_get_ThreadState(tid);
4860   tst = tmp;   4860   tst = tmp;
4861   tmp___0 = __builtin_expect((long )(! (! ((unsigned int )tst->status == 2U))),   4861   tmp___0 = __builtin_expect((long )(! (! ((unsigned int )tst->status == 2U))),
4862                              1L);   4862                              1L);
4863   if (tmp___0) {   4863   if (tmp___0) {
4864     4864  
4865   } else {   4865   } else {
4866     vgPlain_assert_fail((Bool )1,   4866     vgPlain_assert_fail((Bool )1,
4867                         (Char const   *)"tst->status == VgTs_Runnable",   4867                         (Char const   *)"tst->status == VgTs_Runnable",
4868                         (Char const   *)"m_scheduler/scheduler.c", 265,   4868                         (Char const   *)"m_scheduler/scheduler.c", 265,
4869                         (Char const   *)"vgPlain_release_BigLock", "");   4869                         (Char const   *)"vgPlain_release_BigLock", "");
4870   }   4870   }
4871   if ((unsigned int )sleepstate == 3U) {   4871   if ((unsigned int )sleepstate == 3U) {
4872     tmp___1 = 1;   4872     tmp___1 = 1;
4873   } else   4873   } else
4874   if ((unsigned int )sleepstate == 4U) {   4874   if ((unsigned int )sleepstate == 4U) {
4875     tmp___1 = 1;   4875     tmp___1 = 1;
4876   } else {   4876   } else {
4877     tmp___1 = 0;   4877     tmp___1 = 0;
4878   }   4878   }
4879   tmp___2 = __builtin_expect((long )tmp___1, 1L);   4879   tmp___2 = __builtin_expect((long )tmp___1, 1L);
4880   if (tmp___2) {   4880   if (tmp___2) {
4881     4881  
4882   } else {   4882   } else {
4883     vgPlain_assert_fail((Bool )1,   4883     vgPlain_assert_fail((Bool )1,
4884                         (Char const   *)"sleepstate == VgTs_WaitSys || sleepstate == VgTs_Yielding",   4884                         (Char const   *)"sleepstate == VgTs_WaitSys || sleepstate == VgTs_Yielding",
4885                         (Char const   *)"m_scheduler/scheduler.c", 268,   4885                         (Char const   *)"m_scheduler/scheduler.c", 268,
4886                         (Char const   *)"vgPlain_release_BigLock", "");   4886                         (Char const   *)"vgPlain_release_BigLock", "");
4887   }   4887   }
4888   tst->status = sleepstate;   4888   tst->status = sleepstate;
4889   tmp___3 = __builtin_expect((long )(! (! (vgPlain_running_tid == tid))), 1L);   4889   tmp___3 = __builtin_expect((long )(! (! (vgPlain_running_tid == tid))), 1L);
4890   if (tmp___3) {   4890   if (tmp___3) {
4891     4891  
4892   } else {   4892   } else {
4893     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(running_tid) == tid",   4893     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(running_tid) == tid",
4894                         (Char const   *)"m_scheduler/scheduler.c", 272,   4894                         (Char const   *)"m_scheduler/scheduler.c", 272,
4895                         (Char const   *)"vgPlain_release_BigLock", "");   4895                         (Char const   *)"vgPlain_release_BigLock", "");
4896   }   4896   }
4897   vgPlain_running_tid = (ThreadId )0;   4897   vgPlain_running_tid = (ThreadId )0;
4898   if (vgPlain_clo_trace_sched) {   4898   if (vgPlain_clo_trace_sched) {
4899     tmp___4 = vgPlain_strlen((Char const   *)who);   4899     tmp___4 = vgPlain_strlen((Char const   *)who);
4900     if (tmp___4 <= 100UL) {   4900     if (tmp___4 <= 100UL) {
4901       tmp___5 = 1;   4901       tmp___5 = 1;
4902     } else {   4902     } else {
4903       tmp___5 = 0;   4903       tmp___5 = 0;
4904     }   4904     }
4905     tmp___6 = __builtin_expect((long )tmp___5, 1L);   4905     tmp___6 = __builtin_expect((long )tmp___5, 1L);
4906     if (tmp___6) {   4906     if (tmp___6) {
4907     4907  
4908     } else {   4908     } else {
4909       vgPlain_assert_fail((Bool )1,   4909       vgPlain_assert_fail((Bool )1,
4910                           (Char const   *)"VG_(strlen)(who) <= 200-100",   4910                           (Char const   *)"VG_(strlen)(who) <= 200-100",
4911                           (Char const   *)"m_scheduler/scheduler.c", 277,   4911                           (Char const   *)"m_scheduler/scheduler.c", 277,
4912                           (Char const   *)"vgPlain_release_BigLock", "");   4912                           (Char const   *)"vgPlain_release_BigLock", "");
4913     }   4913     }
4914     tmp___7 = vgPlain_name_of_ThreadStatus(sleepstate);   4914     tmp___7 = vgPlain_name_of_ThreadStatus(sleepstate);
4915     vgPlain_sprintf(buf, "releasing lock (%s) -> %s", who, tmp___7);   4915     vgPlain_sprintf(buf, "releasing lock (%s) -> %s", who, tmp___7);
4916     print_sched_event(tid, buf);   4916     print_sched_event(tid, buf);
4917   } else {   4917   } else {
4918     4918  
4919   }   4919   }
4920   vgModuleLocal_sema_up(& the_BigLock, (Bool )0);   4920   vgModuleLocal_sema_up(& the_BigLock, (Bool )0);
4921   return;   4921   return;
4922 }   4922 }
4923 }   4923 }
4924 void vgPlain_acquire_BigLock_LL(HChar *who )   4924 void vgPlain_acquire_BigLock_LL(HChar *who )
4925 {   4925 {
4926     4926  
4927     4927  
4928   {   4928   {
4929   vgModuleLocal_sema_down(& the_BigLock, (Bool )1);   4929   vgModuleLocal_sema_down(& the_BigLock, (Bool )1);
4930   return;   4930   return;
4931 }   4931 }
4932 }   4932 }
4933 void vgPlain_release_BigLock_LL(HChar *who )   4933 void vgPlain_release_BigLock_LL(HChar *who )
4934 {   4934 {
4935     4935  
4936     4936  
4937   {   4937   {
4938   vgModuleLocal_sema_up(& the_BigLock, (Bool )1);   4938   vgModuleLocal_sema_up(& the_BigLock, (Bool )1);
4939   return;   4939   return;
4940 }   4940 }
4941 }   4941 }
4942 void vgPlain_exit_thread(ThreadId tid )   4942 void vgPlain_exit_thread(ThreadId tid )
4943 {   4943 {
4944   Bool tmp ;   4944   Bool tmp ;
4945   int tmp___0 ;   4945   int tmp___0 ;
4946   long tmp___1 ;   4946   long tmp___1 ;
4947   Bool tmp___2 ;   4947   Bool tmp___2 ;
4948   int tmp___3 ;   4948   int tmp___3 ;
4949   long tmp___4 ;   4949   long tmp___4 ;
4950   Bool tmp___5 ;   4950   Bool tmp___5 ;
4951   int tmp___6 ;   4951   int tmp___6 ;
4952   long tmp___7 ;   4952   long tmp___7 ;
4953   long tmp___8 ;   4953   long tmp___8 ;
4954     4954  
4955   {   4955   {
4956   tmp = vgPlain_is_valid_tid(tid);   4956   tmp = vgPlain_is_valid_tid(tid);
4957   if (tmp) {   4957   if (tmp) {
4958     tmp___0 = 1;   4958     tmp___0 = 1;
4959   } else {   4959   } else {
4960     tmp___0 = 0;   4960     tmp___0 = 0;
4961   }   4961   }
4962   tmp___1 = __builtin_expect((long )tmp___0, 1L);   4962   tmp___1 = __builtin_expect((long )tmp___0, 1L);
4963   if (tmp___1) {   4963   if (tmp___1) {
4964     4964  
4965   } else {   4965   } else {
4966     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_valid_tid)(tid)",   4966     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_valid_tid)(tid)",
4967                         (Char const   *)"m_scheduler/scheduler.c", 306,   4967                         (Char const   *)"m_scheduler/scheduler.c", 306,
4968                         (Char const   *)"vgPlain_exit_thread", "");   4968                         (Char const   *)"vgPlain_exit_thread", "");
4969   }   4969   }
4970   tmp___2 = vgPlain_is_running_thread(tid);   4970   tmp___2 = vgPlain_is_running_thread(tid);
4971   if (tmp___2) {   4971   if (tmp___2) {
4972     tmp___3 = 1;   4972     tmp___3 = 1;
4973   } else {   4973   } else {
4974     tmp___3 = 0;   4974     tmp___3 = 0;
4975   }   4975   }
4976   tmp___4 = __builtin_expect((long )tmp___3, 1L);   4976   tmp___4 = __builtin_expect((long )tmp___3, 1L);
4977   if (tmp___4) {   4977   if (tmp___4) {
4978     4978  
4979   } else {   4979   } else {
4980     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(tid)",   4980     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(tid)",
4981                         (Char const   *)"m_scheduler/scheduler.c", 307,   4981                         (Char const   *)"m_scheduler/scheduler.c", 307,
4982                         (Char const   *)"vgPlain_exit_thread", "");   4982                         (Char const   *)"vgPlain_exit_thread", "");
4983   }   4983   }
4984   tmp___5 = vgPlain_is_exiting(tid);   4984   tmp___5 = vgPlain_is_exiting(tid);
4985   if (tmp___5) {   4985   if (tmp___5) {
4986     tmp___6 = 1;   4986     tmp___6 = 1;
4987   } else {   4987   } else {
4988     tmp___6 = 0;   4988     tmp___6 = 0;
4989   }   4989   }
4990   tmp___7 = __builtin_expect((long )tmp___6, 1L);   4990   tmp___7 = __builtin_expect((long )tmp___6, 1L);
4991   if (tmp___7) {   4991   if (tmp___7) {
4992     4992  
4993   } else {   4993   } else {
4994     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_exiting)(tid)",   4994     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_exiting)(tid)",
4995                         (Char const   *)"m_scheduler/scheduler.c", 308,   4995                         (Char const   *)"m_scheduler/scheduler.c", 308,
4996                         (Char const   *)"vgPlain_exit_thread", "");   4996                         (Char const   *)"vgPlain_exit_thread", "");
4997   }   4997   }
4998   mostly_clear_thread_record(tid);   4998   mostly_clear_thread_record(tid);
4999   vgPlain_running_tid = (ThreadId )0;   4999   vgPlain_running_tid = (ThreadId )0;
5000   tmp___8 = __builtin_expect((long )(! (! ((unsigned int )vgPlain_threads[tid].exitreason != 0U))),   5000   tmp___8 = __builtin_expect((long )(! (! ((unsigned int )vgPlain_threads[tid].exitreason != 0U))),
5001                              1L);   5001                              1L);
5002   if (tmp___8) {   5002   if (tmp___8) {
5003     5003  
5004   } else {   5004   } else {
5005     vgPlain_assert_fail((Bool )1,   5005     vgPlain_assert_fail((Bool )1,
5006                         (Char const   *)"VG_(threads)[tid].exitreason != VgSrc_None",   5006                         (Char const   *)"VG_(threads)[tid].exitreason != VgSrc_None",
5007                         (Char const   *)"m_scheduler/scheduler.c", 314,   5007                         (Char const   *)"m_scheduler/scheduler.c", 314,
5008                         (Char const   *)"vgPlain_exit_thread", "");   5008                         (Char const   *)"vgPlain_exit_thread", "");
5009   }   5009   }
5010   if (vgPlain_clo_trace_sched) {   5010   if (vgPlain_clo_trace_sched) {
5011     print_sched_event(tid, (Char *)"release lock in VG_(exit_thread)");   5011     print_sched_event(tid, (Char *)"release lock in VG_(exit_thread)");
5012   } else {   5012   } else {
5013     5013  
5014   }   5014   }
5015   vgModuleLocal_sema_up(& the_BigLock, (Bool )0);   5015   vgModuleLocal_sema_up(& the_BigLock, (Bool )0);
5016   return;   5016   return;
5017 }   5017 }
5018 }   5018 }
5019 void vgPlain_get_thread_out_of_syscall(ThreadId tid )   5019 void vgPlain_get_thread_out_of_syscall(ThreadId tid )
5020 {   5020 {
5021   Bool tmp ;   5021   Bool tmp ;
5022   int tmp___0 ;   5022   int tmp___0 ;
5023   long tmp___1 ;   5023   long tmp___1 ;
5024   Bool tmp___2 ;   5024   Bool tmp___2 ;
5025   int tmp___3 ;   5025   int tmp___3 ;
5026   long tmp___4 ;   5026   long tmp___4 ;
5027   Int r  __attribute__((__unused__)) ;   5027   Int r  __attribute__((__unused__)) ;
5028   Int tmp___5 ;   5028   Int tmp___5 ;
5029     5029  
5030   {   5030   {
5031   tmp = vgPlain_is_valid_tid(tid);   5031   tmp = vgPlain_is_valid_tid(tid);
5032   if (tmp) {   5032   if (tmp) {
5033     tmp___0 = 1;   5033     tmp___0 = 1;
5034   } else {   5034   } else {
5035     tmp___0 = 0;   5035     tmp___0 = 0;
5036   }   5036   }
5037   tmp___1 = __builtin_expect((long )tmp___0, 1L);   5037   tmp___1 = __builtin_expect((long )tmp___0, 1L);
5038   if (tmp___1) {   5038   if (tmp___1) {
5039     5039  
5040   } else {   5040   } else {
5041     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_valid_tid)(tid)",   5041     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_valid_tid)(tid)",
5042                         (Char const   *)"m_scheduler/scheduler.c", 327,   5042                         (Char const   *)"m_scheduler/scheduler.c", 327,
5043                         (Char const   *)"vgPlain_get_thread_out_of_syscall", "");   5043                         (Char const   *)"vgPlain_get_thread_out_of_syscall", "");
5044   }   5044   }
5045   tmp___2 = vgPlain_is_running_thread(tid);   5045   tmp___2 = vgPlain_is_running_thread(tid);
5046   if (tmp___2) {   5046   if (tmp___2) {
5047     tmp___3 = 0;   5047     tmp___3 = 0;
5048   } else {   5048   } else {
5049     tmp___3 = 1;   5049     tmp___3 = 1;
5050   }   5050   }
5051   tmp___4 = __builtin_expect((long )tmp___3, 1L);   5051   tmp___4 = __builtin_expect((long )tmp___3, 1L);
5052   if (tmp___4) {   5052   if (tmp___4) {
5053     5053  
5054   } else {   5054   } else {
5055     vgPlain_assert_fail((Bool )1,   5055     vgPlain_assert_fail((Bool )1,
5056                         (Char const   *)"!VG_(is_running_thread)(tid)",   5056                         (Char const   *)"!VG_(is_running_thread)(tid)",
5057                         (Char const   *)"m_scheduler/scheduler.c", 328,   5057                         (Char const   *)"m_scheduler/scheduler.c", 328,
5058                         (Char const   *)"vgPlain_get_thread_out_of_syscall", "");   5058                         (Char const   *)"vgPlain_get_thread_out_of_syscall", "");
5059   }   5059   }
5060   if ((unsigned int )vgPlain_threads[tid].status == 3U) {   5060   if ((unsigned int )vgPlain_threads[tid].status == 3U) {
5061     if (vgPlain_clo_trace_signals) {   5061     if (vgPlain_clo_trace_signals) {
5062       vgPlain_message((VgMsgKind )2,   5062       vgPlain_message((VgMsgKind )2,
5063                       "get_thread_out_of_syscall zaps tid %d lwp %d\n", tid,   5063                       "get_thread_out_of_syscall zaps tid %d lwp %d\n", tid,
5064                       vgPlain_threads[tid].os_state.lwpid);   5064                       vgPlain_threads[tid].os_state.lwpid);
5065     } else {   5065     } else {
5066     5066  
5067     }   5067     }
5068     tmp___5 = vgPlain_tkill(vgPlain_threads[tid].os_state.lwpid,   5068     tmp___5 = vgPlain_tkill(vgPlain_threads[tid].os_state.lwpid,
5069                             vgPlain_max_signal);   5069                             vgPlain_max_signal);
5070     r = tmp___5;   5070     r = tmp___5;
5071   } else {   5071   } else {
5072     5072  
5073   }   5073   }
5074   return;   5074   return;
5075 }   5075 }
5076 }   5076 }
5077 void vgPlain_vg_yield(void)   5077 void vgPlain_vg_yield(void)
5078 {   5078 {
5079   ThreadId tid ;   5079   ThreadId tid ;
5080   long tmp ;   5080   long tmp ;
5081   Int tmp___0 ;   5081   Int tmp___0 ;
5082   int tmp___1 ;   5082   int tmp___1 ;
5083   long tmp___2 ;   5083   long tmp___2 ;
5084     5084  
5085   {   5085   {
5086   tid = vgPlain_running_tid;   5086   tid = vgPlain_running_tid;
5087   tmp = __builtin_expect((long )(! (! (tid != 0U))), 1L);   5087   tmp = __builtin_expect((long )(! (! (tid != 0U))), 1L);
5088   if (tmp) {   5088   if (tmp) {
5089     5089  
5090   } else {   5090   } else {
5091     vgPlain_assert_fail((Bool )1, (Char const   *)"tid != VG_INVALID_THREADID",   5091     vgPlain_assert_fail((Bool )1, (Char const   *)"tid != VG_INVALID_THREADID",
5092                         (Char const   *)"m_scheduler/scheduler.c", 374,   5092                         (Char const   *)"m_scheduler/scheduler.c", 374,
5093                         (Char const   *)"vgPlain_vg_yield", "");   5093                         (Char const   *)"vgPlain_vg_yield", "");
5094   }   5094   }
5095   tmp___0 = vgPlain_gettid();   5095   tmp___0 = vgPlain_gettid();
5096   if (vgPlain_threads[tid].os_state.lwpid == tmp___0) {   5096   if (vgPlain_threads[tid].os_state.lwpid == tmp___0) {
5097     tmp___1 = 1;   5097     tmp___1 = 1;
5098   } else {   5098   } else {
5099     tmp___1 = 0;   5099     tmp___1 = 0;
5100   }   5100   }
5101   tmp___2 = __builtin_expect((long )tmp___1, 1L);   5101   tmp___2 = __builtin_expect((long )tmp___1, 1L);
5102   if (tmp___2) {   5102   if (tmp___2) {
5103     5103  
5104   } else {   5104   } else {
5105     vgPlain_assert_fail((Bool )1,   5105     vgPlain_assert_fail((Bool )1,
5106                         (Char const   *)"VG_(threads)[tid].os_state.lwpid == VG_(gettid)()",   5106                         (Char const   *)"VG_(threads)[tid].os_state.lwpid == VG_(gettid)()",
5107                         (Char const   *)"m_scheduler/scheduler.c", 375,   5107                         (Char const   *)"m_scheduler/scheduler.c", 375,
5108                         (Char const   *)"vgPlain_vg_yield", "");   5108                         (Char const   *)"vgPlain_vg_yield", "");
5109   }   5109   }
5110   vgPlain_release_BigLock(tid, (ThreadStatus )4, (HChar *)"VG_(vg_yield)");   5110   vgPlain_release_BigLock(tid, (ThreadStatus )4, (HChar *)"VG_(vg_yield)");
5111   vgPlain_do_syscall((UWord )158, (UWord )0, (UWord )0, (UWord )0, (UWord )0,   5111   vgPlain_do_syscall((UWord )158, (UWord )0, (UWord )0, (UWord )0, (UWord )0,
5112                      (UWord )0, (UWord )0, (UWord )0, (UWord )0);   5112                      (UWord )0, (UWord )0, (UWord )0, (UWord )0);
5113   vgPlain_acquire_BigLock(tid, (HChar *)"VG_(vg_yield)");   5113   vgPlain_acquire_BigLock(tid, (HChar *)"VG_(vg_yield)");
5114   return;   5114   return;
5115 }   5115 }
5116 }   5116 }
5117 static void block_signals(void)   5117 static void block_signals(void)
5118 {   5118 {
5119   vki_sigset_t mask ;   5119   vki_sigset_t mask ;
5120     5120  
5121   {   5121   {
5122   vgPlain_sigfillset(& mask);   5122   vgPlain_sigfillset(& mask);
5123   vgPlain_sigdelset(& mask, 11);   5123   vgPlain_sigdelset(& mask, 11);
5124   vgPlain_sigdelset(& mask, 7);   5124   vgPlain_sigdelset(& mask, 7);
5125   vgPlain_sigdelset(& mask, 8);   5125   vgPlain_sigdelset(& mask, 8);
5126   vgPlain_sigdelset(& mask, 4);   5126   vgPlain_sigdelset(& mask, 4);
5127   vgPlain_sigdelset(& mask, 5);   5127   vgPlain_sigdelset(& mask, 5);
5128   vgPlain_sigdelset(& mask, 19);   5128   vgPlain_sigdelset(& mask, 19);
5129   vgPlain_sigdelset(& mask, 9);   5129   vgPlain_sigdelset(& mask, 9);
5130   vgPlain_sigprocmask(2, (vki_sigset_t const   *)(& mask),   5130   vgPlain_sigprocmask(2, (vki_sigset_t const   *)(& mask),
5131                       (vki_sigset_t *)((void *)0));   5131                       (vki_sigset_t *)((void *)0));
5132   return;   5132   return;
5133 }   5133 }
5134 }   5134 }
5135 static void os_state_clear(ThreadState *tst )   5135 static void os_state_clear(ThreadState *tst )
5136 {   5136 {
5137     5137  
5138     5138  
5139   {   5139   {
5140   tst->os_state.lwpid = 0;   5140   tst->os_state.lwpid = 0;
5141   tst->os_state.threadgroup = 0;   5141   tst->os_state.threadgroup = 0;
5142   return;   5142   return;
5143 }   5143 }
5144 }   5144 }
5145 static void os_state_init(ThreadState *tst )   5145 static void os_state_init(ThreadState *tst )
5146 {   5146 {
5147     5147  
5148     5148  
5149   {   5149   {
5150   tst->os_state.valgrind_stack_base = (Addr )0;   5150   tst->os_state.valgrind_stack_base = (Addr )0;
5151   tst->os_state.valgrind_stack_init_SP = (Addr )0;   5151   tst->os_state.valgrind_stack_init_SP = (Addr )0;
5152   os_state_clear(tst);   5152   os_state_clear(tst);
5153   return;   5153   return;
5154 }   5154 }
5155 }   5155 }
5156 static void mostly_clear_thread_record(ThreadId tid )   5156 static void mostly_clear_thread_record(ThreadId tid )
5157 {   5157 {
5158   vki_sigset_t savedmask ;   5158   vki_sigset_t savedmask ;
5159   int tmp ;   5159   int tmp ;
5160   long tmp___0 ;   5160   long tmp___0 ;
5161     5161  
5162   {   5162   {
5163   if (tid >= 0U) {   5163   if (tid >= 0U) {
5164     if (tid < 500U) {   5164     if (tid < 500U) {
5165       tmp = 1;   5165       tmp = 1;
5166     } else {   5166     } else {
5167       tmp = 0;   5167       tmp = 0;
5168     }   5168     }
5169   } else {   5169   } else {
5170     tmp = 0;   5170     tmp = 0;
5171   }   5171   }
5172   tmp___0 = __builtin_expect((long )tmp, 1L);   5172   tmp___0 = __builtin_expect((long )tmp, 1L);
5173   if (tmp___0) {   5173   if (tmp___0) {
5174     5174  
5175   } else {   5175   } else {
5176     vgPlain_assert_fail((Bool )1,   5176     vgPlain_assert_fail((Bool )1,
5177                         (Char const   *)"tid >= 0 && tid < VG_N_THREADS",   5177                         (Char const   *)"tid >= 0 && tid < VG_N_THREADS",
5178                         (Char const   *)"m_scheduler/scheduler.c", 447,   5178                         (Char const   *)"m_scheduler/scheduler.c", 447,
5179                         (Char const   *)"mostly_clear_thread_record", "");   5179                         (Char const   *)"mostly_clear_thread_record", "");
5180   }   5180   }
5181   vgPlain_cleanup_thread(& vgPlain_threads[tid].arch);   5181   vgPlain_cleanup_thread(& vgPlain_threads[tid].arch);
5182   vgPlain_threads[tid].tid = tid;   5182   vgPlain_threads[tid].tid = tid;
5183   vgPlain_threads[tid].status = (ThreadStatus )5;   5183   vgPlain_threads[tid].status = (ThreadStatus )5;
5184   vgPlain_sigemptyset(& vgPlain_threads[tid].sig_mask);   5184   vgPlain_sigemptyset(& vgPlain_threads[tid].sig_mask);
5185   vgPlain_sigemptyset(& vgPlain_threads[tid].tmp_sig_mask);   5185   vgPlain_sigemptyset(& vgPlain_threads[tid].tmp_sig_mask);
5186   os_state_clear(& vgPlain_threads[tid]);   5186   os_state_clear(& vgPlain_threads[tid]);
5187   vgPlain_threads[tid].altstack.ss_sp = (void *)3735928559U;   5187   vgPlain_threads[tid].altstack.ss_sp = (void *)3735928559U;
5188   vgPlain_threads[tid].altstack.ss_size = (vki_size_t )0;   5188   vgPlain_threads[tid].altstack.ss_size = (vki_size_t )0;
5189   vgPlain_threads[tid].altstack.ss_flags = 2;   5189   vgPlain_threads[tid].altstack.ss_flags = 2;
5190   vgPlain_clear_out_queued_signals(tid, & savedmask);   5190   vgPlain_clear_out_queued_signals(tid, & savedmask);
5191   vgPlain_threads[tid].sched_jmpbuf_valid = (Bool )0;   5191   vgPlain_threads[tid].sched_jmpbuf_valid = (Bool )0;
5192   return;   5192   return;
5193 }   5193 }
5194 }   5194 }
5195 static void sched_fork_cleanup(ThreadId me )   5195 static void sched_fork_cleanup(ThreadId me )
5196 {   5196 {
5197   ThreadId tid ;   5197   ThreadId tid ;
5198   long tmp ;   5198   long tmp ;
5199     5199  
5200   {   5200   {
5201   tmp = __builtin_expect((long )(! (! (vgPlain_running_tid == me))), 1L);   5201   tmp = __builtin_expect((long )(! (! (vgPlain_running_tid == me))), 1L);
5202   if (tmp) {   5202   if (tmp) {
5203     5203  
5204   } else {   5204   } else {
5205     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(running_tid) == me",   5205     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(running_tid) == me",
5206                         (Char const   *)"m_scheduler/scheduler.c", 490,   5206                         (Char const   *)"m_scheduler/scheduler.c", 490,
5207                         (Char const   *)"sched_fork_cleanup", "");   5207                         (Char const   *)"sched_fork_cleanup", "");
5208   }   5208   }
5209   vgPlain_threads[me].os_state.lwpid = vgPlain_gettid();   5209   vgPlain_threads[me].os_state.lwpid = vgPlain_gettid();
5210   vgPlain_threads[me].os_state.threadgroup = vgPlain_getpid();   5210   vgPlain_threads[me].os_state.threadgroup = vgPlain_getpid();
5211   tid = (ThreadId )1;   5211   tid = (ThreadId )1;
5212   while (tid < 500U) {   5212   while (tid < 500U) {
5213     if (tid != me) {   5213     if (tid != me) {
5214       mostly_clear_thread_record(tid);   5214       mostly_clear_thread_record(tid);
5215       vgPlain_threads[tid].status = (ThreadStatus )0;   5215       vgPlain_threads[tid].status = (ThreadStatus )0;
5216       vgPlain_clear_syscallInfo((Int )tid);   5216       vgPlain_clear_syscallInfo((Int )tid);
5217     } else {   5217     } else {
5218     5218  
5219     }   5219     }
5220     tid ++;   5220     tid ++;
5221   }   5221   }
5222   vgModuleLocal_sema_deinit(& the_BigLock);   5222   vgModuleLocal_sema_deinit(& the_BigLock);
5223   vgModuleLocal_sema_init(& the_BigLock);   5223   vgModuleLocal_sema_init(& the_BigLock);
5224   vgModuleLocal_sema_down(& the_BigLock, (Bool )0);   5224   vgModuleLocal_sema_down(& the_BigLock, (Bool )0);
5225   return;   5225   return;
5226 }   5226 }
5227 }   5227 }
5228 ThreadId vgPlain_scheduler_init_phase1(void)   5228 ThreadId vgPlain_scheduler_init_phase1(void)
5229 {   5229 {
5230   Int i ;   5230   Int i ;
5231   ThreadId tid_main ;   5231   ThreadId tid_main ;
5232   long tmp ;   5232   long tmp ;
5233     5233  
5234   {   5234   {
5235   vgPlain_debugLog(1, "sched", "sched_init_phase1\n");   5235   vgPlain_debugLog(1, "sched", "sched_init_phase1\n");
5236   vgModuleLocal_sema_init(& the_BigLock);   5236   vgModuleLocal_sema_init(& the_BigLock);
5237   i = 0;   5237   i = 0;
5238   while (i < 500) {   5238   while (i < 500) {
5239     vgPlain_memset((void *)(& vgPlain_threads[i]), 0,   5239     vgPlain_memset((void *)(& vgPlain_threads[i]), 0,
5240                    (SizeT )sizeof(vgPlain_threads[i]));   5240                    (SizeT )sizeof(vgPlain_threads[i]));
5241     vgPlain_threads[i].sig_queue = (struct SigQueue *)((void *)0);   5241     vgPlain_threads[i].sig_queue = (struct SigQueue *)((void *)0);
5242     os_state_init(& vgPlain_threads[i]);   5242     os_state_init(& vgPlain_threads[i]);
5243     mostly_clear_thread_record((ThreadId )i);   5243     mostly_clear_thread_record((ThreadId )i);
5244     vgPlain_threads[i].status = (ThreadStatus )0;   5244     vgPlain_threads[i].status = (ThreadStatus )0;
5245     vgPlain_threads[i].client_stack_szB = (SizeT )0;   5245     vgPlain_threads[i].client_stack_szB = (SizeT )0;
5246     vgPlain_threads[i].client_stack_highest_word = (Addr )((void *)0);   5246     vgPlain_threads[i].client_stack_highest_word = (Addr )((void *)0);
5247     i ++;   5247     i ++;
5248   }   5248   }
5249   tid_main = vgPlain_alloc_ThreadState();   5249   tid_main = vgPlain_alloc_ThreadState();
5250   tmp = __builtin_expect((long )(! (! (tid_main == 1U))), 1L);   5250   tmp = __builtin_expect((long )(! (! (tid_main == 1U))), 1L);
5251   if (tmp) {   5251   if (tmp) {
5252     5252  
5253   } else {   5253   } else {
5254     vgPlain_assert_fail((Bool )1, (Char const   *)"tid_main == 1",   5254     vgPlain_assert_fail((Bool )1, (Char const   *)"tid_main == 1",
5255                         (Char const   *)"m_scheduler/scheduler.c", 551,   5255                         (Char const   *)"m_scheduler/scheduler.c", 551,
5256                         (Char const   *)"vgPlain_scheduler_init_phase1", "");   5256                         (Char const   *)"vgPlain_scheduler_init_phase1", "");
5257   }   5257   }
5258   return (tid_main);   5258   return (tid_main);
5259 }   5259 }
5260 }   5260 }
5261 void vgPlain_scheduler_init_phase2(ThreadId tid_main , Addr clstack_end ,   5261 void vgPlain_scheduler_init_phase2(ThreadId tid_main , Addr clstack_end ,
5262                                    SizeT clstack_size )   5262                                    SizeT clstack_size )
5263 {   5263 {
5264   long tmp ;   5264   long tmp ;
5265   long tmp___0 ;   5265   long tmp___0 ;
5266     5266  
5267   {   5267   {
5268   vgPlain_debugLog(1, "sched",   5268   vgPlain_debugLog(1, "sched",
5269                    "sched_init_phase2: tid_main=%d, cls_end=0x%lx, cls_sz=%ld\n",   5269                    "sched_init_phase2: tid_main=%d, cls_end=0x%lx, cls_sz=%ld\n",
5270                    tid_main, clstack_end, clstack_size);   5270                    tid_main, clstack_end, clstack_size);
5271   tmp = __builtin_expect((long )(! (! (0UL == ((clstack_end + 1UL) & ((1UL << 12) - 1UL))))),   5271   tmp = __builtin_expect((long )(! (! (0UL == ((clstack_end + 1UL) & ((1UL << 12) - 1UL))))),
5272                          1L);   5272                          1L);
5273   if (tmp) {   5273   if (tmp) {
5274     5274  
5275   } else {   5275   } else {
5276     vgPlain_assert_fail((Bool )1,   5276     vgPlain_assert_fail((Bool )1,
5277                         (Char const   *)"VG_IS_PAGE_ALIGNED(clstack_end+1)",   5277                         (Char const   *)"VG_IS_PAGE_ALIGNED(clstack_end+1)",
5278                         (Char const   *)"m_scheduler/scheduler.c", 571,   5278                         (Char const   *)"m_scheduler/scheduler.c", 571,
5279                         (Char const   *)"vgPlain_scheduler_init_phase2", "");   5279                         (Char const   *)"vgPlain_scheduler_init_phase2", "");
5280   }   5280   }
5281   tmp___0 = __builtin_expect((long )(! (! (0UL == (clstack_size & ((1UL << 12) - 1UL))))),   5281   tmp___0 = __builtin_expect((long )(! (! (0UL == (clstack_size & ((1UL << 12) - 1UL))))),
5282                              1L);   5282                              1L);
5283   if (tmp___0) {   5283   if (tmp___0) {
5284     5284  
5285   } else {   5285   } else {
5286     vgPlain_assert_fail((Bool )1,   5286     vgPlain_assert_fail((Bool )1,
5287                         (Char const   *)"VG_IS_PAGE_ALIGNED(clstack_size)",   5287                         (Char const   *)"VG_IS_PAGE_ALIGNED(clstack_size)",
5288                         (Char const   *)"m_scheduler/scheduler.c", 572,   5288                         (Char const   *)"m_scheduler/scheduler.c", 572,
5289                         (Char const   *)"vgPlain_scheduler_init_phase2", "");   5289                         (Char const   *)"vgPlain_scheduler_init_phase2", "");
5290   }   5290   }
5291   vgPlain_threads[tid_main].client_stack_highest_word = (clstack_end + 1UL) - (Addr )sizeof(UWord );   5291   vgPlain_threads[tid_main].client_stack_highest_word = (clstack_end + 1UL) - (Addr )sizeof(UWord );
5292   vgPlain_threads[tid_main].client_stack_szB = clstack_size;   5292   vgPlain_threads[tid_main].client_stack_szB = clstack_size;
5293   vgPlain_atfork((void (*)(ThreadId  ))((void *)0),   5293   vgPlain_atfork((void (*)(ThreadId  ))((void *)0),
5294                  (void (*)(ThreadId  ))((void *)0), & sched_fork_cleanup);   5294                  (void (*)(ThreadId  ))((void *)0), & sched_fork_cleanup);
5295   return;   5295   return;
5296 }   5296 }
5297 }   5297 }
5298 static void do_pre_run_checks(ThreadState *tst )   5298 static void do_pre_run_checks(ThreadState *tst )
5299 {   5299 {
5300   Addr a_vex ;   5300   Addr a_vex ;
5301   Addr a_vexsh1 ;   5301   Addr a_vexsh1 ;
5302   Addr a_vexsh2 ;   5302   Addr a_vexsh2 ;
5303   Addr a_spill ;   5303   Addr a_spill ;
5304   UInt sz_vex ;   5304   UInt sz_vex ;
5305   UInt sz_vexsh1 ;   5305   UInt sz_vexsh1 ;
5306   UInt sz_vexsh2 ;   5306   UInt sz_vexsh2 ;
5307   UInt sz_spill ;   5307   UInt sz_spill ;
5308   long tmp ;   5308   long tmp ;
5309   long tmp___0 ;   5309   long tmp___0 ;
5310   long tmp___1 ;   5310   long tmp___1 ;
5311   long tmp___2 ;   5311   long tmp___2 ;
5312   long tmp___3 ;   5312   long tmp___3 ;
5313   long tmp___4 ;   5313   long tmp___4 ;
5314   long tmp___5 ;   5314   long tmp___5 ;
5315   long tmp___6 ;   5315   long tmp___6 ;
5316   long tmp___7 ;   5316   long tmp___7 ;
5317   long tmp___8 ;   5317   long tmp___8 ;
5318   long tmp___9 ;   5318   long tmp___9 ;
5319   long tmp___10 ;   5319   long tmp___10 ;
5320   long tmp___11 ;   5320   long tmp___11 ;
5321   long tmp___12 ;   5321   long tmp___12 ;
5322     5322  
5323   {   5323   {
5324   a_vex = (Addr )(& tst->arch.vex);   5324   a_vex = (Addr )(& tst->arch.vex);
5325   a_vexsh1 = (Addr )(& tst->arch.vex_shadow1);   5325   a_vexsh1 = (Addr )(& tst->arch.vex_shadow1);
5326   a_vexsh2 = (Addr )(& tst->arch.vex_shadow2);   5326   a_vexsh2 = (Addr )(& tst->arch.vex_shadow2);
5327   a_spill = (Addr )(& tst->arch.vex_spill);   5327   a_spill = (Addr )(& tst->arch.vex_spill);
5328   sz_vex = sizeof(tst->arch.vex);   5328   sz_vex = sizeof(tst->arch.vex);
5329   sz_vexsh1 = sizeof(tst->arch.vex_shadow1);   5329   sz_vexsh1 = sizeof(tst->arch.vex_shadow1);
5330   sz_vexsh2 = sizeof(tst->arch.vex_shadow2);   5330   sz_vexsh2 = sizeof(tst->arch.vex_shadow2);
5331   sz_spill = sizeof(tst->arch.vex_spill);   5331   sz_spill = sizeof(tst->arch.vex_spill);
5332   tmp = __builtin_expect((long )(! (! (0UL == ((Addr )sz_vex & 15UL)))), 1L);   5332   tmp = __builtin_expect((long )(! (! (0UL == ((Addr )sz_vex & 15UL)))), 1L);
5333   if (tmp) {   5333   if (tmp) {
5334     5334  
5335   } else {   5335   } else {
5336     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(sz_vex)",   5336     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(sz_vex)",
5337                         (Char const   *)"m_scheduler/scheduler.c", 632,   5337                         (Char const   *)"m_scheduler/scheduler.c", 632,
5338                         (Char const   *)"do_pre_run_checks", "");   5338                         (Char const   *)"do_pre_run_checks", "");
5339   }   5339   }
5340   tmp___0 = __builtin_expect((long )(! (! (0UL == ((Addr )sz_vexsh1 & 15UL)))),   5340   tmp___0 = __builtin_expect((long )(! (! (0UL == ((Addr )sz_vexsh1 & 15UL)))),
5341                              1L);   5341                              1L);
5342   if (tmp___0) {   5342   if (tmp___0) {
5343     5343  
5344   } else {   5344   } else {
5345     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(sz_vexsh1)",   5345     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(sz_vexsh1)",
5346                         (Char const   *)"m_scheduler/scheduler.c", 633,   5346                         (Char const   *)"m_scheduler/scheduler.c", 633,
5347                         (Char const   *)"do_pre_run_checks", "");   5347                         (Char const   *)"do_pre_run_checks", "");
5348   }   5348   }
5349   tmp___1 = __builtin_expect((long )(! (! (0UL == ((Addr )sz_vexsh2 & 15UL)))),   5349   tmp___1 = __builtin_expect((long )(! (! (0UL == ((Addr )sz_vexsh2 & 15UL)))),
5350                              1L);   5350                              1L);
5351   if (tmp___1) {   5351   if (tmp___1) {
5352     5352  
5353   } else {   5353   } else {
5354     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(sz_vexsh2)",   5354     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(sz_vexsh2)",
5355                         (Char const   *)"m_scheduler/scheduler.c", 634,   5355                         (Char const   *)"m_scheduler/scheduler.c", 634,
5356                         (Char const   *)"do_pre_run_checks", "");   5356                         (Char const   *)"do_pre_run_checks", "");
5357   }   5357   }
5358   tmp___2 = __builtin_expect((long )(! (! (0UL == ((Addr )sz_spill & 15UL)))),   5358   tmp___2 = __builtin_expect((long )(! (! (0UL == ((Addr )sz_spill & 15UL)))),
5359                              1L);   5359                              1L);
5360   if (tmp___2) {   5360   if (tmp___2) {
5361     5361  
5362   } else {   5362   } else {
5363     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(sz_spill)",   5363     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(sz_spill)",
5364                         (Char const   *)"m_scheduler/scheduler.c", 635,   5364                         (Char const   *)"m_scheduler/scheduler.c", 635,
5365                         (Char const   *)"do_pre_run_checks", "");   5365                         (Char const   *)"do_pre_run_checks", "");
5366   }   5366   }
5367   tmp___3 = __builtin_expect((long )(! (! (0UL == (a_vex & 15UL)))), 1L);   5367   tmp___3 = __builtin_expect((long )(! (! (0UL == (a_vex & 15UL)))), 1L);
5368   if (tmp___3) {   5368   if (tmp___3) {
5369     5369  
5370   } else {   5370   } else {
5371     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(a_vex)",   5371     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(a_vex)",
5372                         (Char const   *)"m_scheduler/scheduler.c", 637,   5372                         (Char const   *)"m_scheduler/scheduler.c", 637,
5373                         (Char const   *)"do_pre_run_checks", "");   5373                         (Char const   *)"do_pre_run_checks", "");
5374   }   5374   }
5375   tmp___4 = __builtin_expect((long )(! (! (0UL == (a_vexsh1 & 15UL)))), 1L);   5375   tmp___4 = __builtin_expect((long )(! (! (0UL == (a_vexsh1 & 15UL)))), 1L);
5376   if (tmp___4) {   5376   if (tmp___4) {
5377     5377  
5378   } else {   5378   } else {
5379     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(a_vexsh1)",   5379     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(a_vexsh1)",
5380                         (Char const   *)"m_scheduler/scheduler.c", 638,   5380                         (Char const   *)"m_scheduler/scheduler.c", 638,
5381                         (Char const   *)"do_pre_run_checks", "");   5381                         (Char const   *)"do_pre_run_checks", "");
5382   }   5382   }
5383   tmp___5 = __builtin_expect((long )(! (! (0UL == (a_vexsh2 & 15UL)))), 1L);   5383   tmp___5 = __builtin_expect((long )(! (! (0UL == (a_vexsh2 & 15UL)))), 1L);
5384   if (tmp___5) {   5384   if (tmp___5) {
5385     5385  
5386   } else {   5386   } else {
5387     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(a_vexsh2)",   5387     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(a_vexsh2)",
5388                         (Char const   *)"m_scheduler/scheduler.c", 639,   5388                         (Char const   *)"m_scheduler/scheduler.c", 639,
5389                         (Char const   *)"do_pre_run_checks", "");   5389                         (Char const   *)"do_pre_run_checks", "");
5390   }   5390   }
5391   tmp___6 = __builtin_expect((long )(! (! (0UL == (a_spill & 15UL)))), 1L);   5391   tmp___6 = __builtin_expect((long )(! (! (0UL == (a_spill & 15UL)))), 1L);
5392   if (tmp___6) {   5392   if (tmp___6) {
5393     5393  
5394   } else {   5394   } else {
5395     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(a_spill)",   5395     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_IS_16_ALIGNED(a_spill)",
5396                         (Char const   *)"m_scheduler/scheduler.c", 640,   5396                         (Char const   *)"m_scheduler/scheduler.c", 640,
5397                         (Char const   *)"do_pre_run_checks", "");   5397                         (Char const   *)"do_pre_run_checks", "");
5398   }   5398   }
5399   tmp___7 = __builtin_expect((long )(! (! (sz_vex == sz_vexsh1))), 1L);   5399   tmp___7 = __builtin_expect((long )(! (! (sz_vex == sz_vexsh1))), 1L);
5400   if (tmp___7) {   5400   if (tmp___7) {
5401     5401  
5402   } else {   5402   } else {
5403     vgPlain_assert_fail((Bool )1, (Char const   *)"sz_vex == sz_vexsh1",   5403     vgPlain_assert_fail((Bool )1, (Char const   *)"sz_vex == sz_vexsh1",
5404                         (Char const   *)"m_scheduler/scheduler.c", 647,   5404                         (Char const   *)"m_scheduler/scheduler.c", 647,
5405                         (Char const   *)"do_pre_run_checks", "");   5405                         (Char const   *)"do_pre_run_checks", "");
5406   }   5406   }
5407   tmp___8 = __builtin_expect((long )(! (! (sz_vex == sz_vexsh2))), 1L);   5407   tmp___8 = __builtin_expect((long )(! (! (sz_vex == sz_vexsh2))), 1L);
5408   if (tmp___8) {   5408   if (tmp___8) {
5409     5409  
5410   } else {   5410   } else {
5411     vgPlain_assert_fail((Bool )1, (Char const   *)"sz_vex == sz_vexsh2",   5411     vgPlain_assert_fail((Bool )1, (Char const   *)"sz_vex == sz_vexsh2",
5412                         (Char const   *)"m_scheduler/scheduler.c", 648,   5412                         (Char const   *)"m_scheduler/scheduler.c", 648,
5413                         (Char const   *)"do_pre_run_checks", "");   5413                         (Char const   *)"do_pre_run_checks", "");
5414   }   5414   }
5415   tmp___9 = __builtin_expect((long )(! (! (a_vex + (Addr )sz_vex == a_vexsh1))),   5415   tmp___9 = __builtin_expect((long )(! (! (a_vex + (Addr )sz_vex == a_vexsh1))),
5416                              1L);   5416                              1L);
5417   if (tmp___9) {   5417   if (tmp___9) {
5418     5418  
5419   } else {   5419   } else {
5420     vgPlain_assert_fail((Bool )1,   5420     vgPlain_assert_fail((Bool )1,
5421                         (Char const   *)"a_vex + 1 * sz_vex == a_vexsh1",   5421                         (Char const   *)"a_vex + 1 * sz_vex == a_vexsh1",
5422                         (Char const   *)"m_scheduler/scheduler.c", 649,   5422                         (Char const   *)"m_scheduler/scheduler.c", 649,
5423                         (Char const   *)"do_pre_run_checks", "");   5423                         (Char const   *)"do_pre_run_checks", "");
5424   }   5424   }
5425   tmp___10 = __builtin_expect((long )(! (! (a_vex + (Addr )(2U * sz_vex) == a_vexsh2))),   5425   tmp___10 = __builtin_expect((long )(! (! (a_vex + (Addr )(2U * sz_vex) == a_vexsh2))),
5426                               1L);   5426                               1L);
5427   if (tmp___10) {   5427   if (tmp___10) {
5428     5428  
5429   } else {   5429   } else {
5430     vgPlain_assert_fail((Bool )1,   5430     vgPlain_assert_fail((Bool )1,
5431                         (Char const   *)"a_vex + 2 * sz_vex == a_vexsh2",   5431                         (Char const   *)"a_vex + 2 * sz_vex == a_vexsh2",
5432                         (Char const   *)"m_scheduler/scheduler.c", 650,   5432                         (Char const   *)"m_scheduler/scheduler.c", 650,
5433                         (Char const   *)"do_pre_run_checks", "");   5433                         (Char const   *)"do_pre_run_checks", "");
5434   }   5434   }
5435   tmp___11 = __builtin_expect((long )(! (! (sz_spill == 4096U))), 1L);   5435   tmp___11 = __builtin_expect((long )(! (! (sz_spill == 4096U))), 1L);
5436   if (tmp___11) {   5436   if (tmp___11) {
5437     5437  
5438   } else {   5438   } else {
5439     vgPlain_assert_fail((Bool )1,   5439     vgPlain_assert_fail((Bool )1,
5440                         (Char const   *)"sz_spill == LibVEX_N_SPILL_BYTES",   5440                         (Char const   *)"sz_spill == LibVEX_N_SPILL_BYTES",
5441                         (Char const   *)"m_scheduler/scheduler.c", 653,   5441                         (Char const   *)"m_scheduler/scheduler.c", 653,
5442                         (Char const   *)"do_pre_run_checks", "");   5442                         (Char const   *)"do_pre_run_checks", "");
5443   }   5443   }
5444   tmp___12 = __builtin_expect((long )(! (! (a_vex + (Addr )(3U * sz_vex) == a_spill))),   5444   tmp___12 = __builtin_expect((long )(! (! (a_vex + (Addr )(3U * sz_vex) == a_spill))),
5445                               1L);   5445                               1L);
5446   if (tmp___12) {   5446   if (tmp___12) {
5447     5447  
5448   } else {   5448   } else {
5449     vgPlain_assert_fail((Bool )1,   5449     vgPlain_assert_fail((Bool )1,
5450                         (Char const   *)"a_vex + 3 * sz_vex == a_spill",   5450                         (Char const   *)"a_vex + 3 * sz_vex == a_spill",
5451                         (Char const   *)"m_scheduler/scheduler.c", 654,   5451                         (Char const   *)"m_scheduler/scheduler.c", 654,
5452                         (Char const   *)"do_pre_run_checks", "");   5452                         (Char const   *)"do_pre_run_checks", "");
5453   }   5453   }
5454   return;   5454   return;
5455 }   5455 }
5456 }   5456 }
5457 void vgPlain_disable_vgdb_poll(void)   5457 void vgPlain_disable_vgdb_poll(void)
5458 {   5458 {
5459     5459  
5460     5460  
5461   {   5461   {
5462   vgdb_next_poll = 0xffffffffffffffffULL;   5462   vgdb_next_poll = 0xffffffffffffffffULL;
5463   return;   5463   return;
5464 }   5464 }
5465 }   5465 }
5466 void vgPlain_force_vgdb_poll(void)   5466 void vgPlain_force_vgdb_poll(void)
5467 {   5467 {
5468     5468  
5469     5469  
5470   {   5470   {
5471   vgdb_next_poll = 0ULL;   5471   vgdb_next_poll = 0ULL;
5472   return;   5472   return;
5473 }   5473 }
5474 }   5474 }
5475 extern int ( /* missing proto */  __builtin_setjmp)() ;   5475 extern int ( /* missing proto */  __builtin_setjmp)() ;
5476 static UInt run_thread_for_a_while(ThreadId tid )   5476 static UInt run_thread_for_a_while(ThreadId tid )
5477 {   5477 {
5478   Int volatile   jumped ;   5478   Int volatile   jumped ;
5479   ThreadState volatile   *tst ;   5479   ThreadState volatile   *tst ;
5480   UInt volatile   trc ;   5480   UInt volatile   trc ;
5481   Int volatile   dispatch_ctr_SAVED ;   5481   Int volatile   dispatch_ctr_SAVED ;
5482   Int volatile   done_this_time ;   5482   Int volatile   done_this_time ;
5483   Bool tmp ;   5483   Bool tmp ;
5484   int tmp___0 ;   5484   int tmp___0 ;
5485   long tmp___1 ;   5485   long tmp___1 ;
5486   Bool tmp___2 ;   5486   Bool tmp___2 ;
5487   int tmp___3 ;   5487   int tmp___3 ;
5488   long tmp___4 ;   5488   long tmp___4 ;
5489   Bool tmp___5 ;   5489   Bool tmp___5 ;
5490   int tmp___6 ;   5490   int tmp___6 ;
5491   long tmp___7 ;   5491   long tmp___7 ;
5492   ThreadState *tmp___8 ;   5492   ThreadState *tmp___8 ;
5493   vki_sigset_t m ;   5493   vki_sigset_t m ;
5494   Int i ;   5494   Int i ;
5495   Int err ;   5495   Int err ;
5496   Int tmp___9 ;   5496   Int tmp___9 ;
5497   long tmp___10 ;   5497   long tmp___10 ;
5498   Int tmp___11 ;   5498   Int tmp___11 ;
5499   long tmp___12 ;   5499   long tmp___12 ;
5500   ThreadState * volatile  _qq_tst ;   5500   ThreadState * volatile  _qq_tst ;
5501   ThreadState *tmp___13 ;   5501   ThreadState *tmp___13 ;
5502   int tmp___14 ;   5502   int tmp___14 ;
5503   long tmp___15 ;   5503   long tmp___15 ;
5504   int tmp___16 ;   5504   int tmp___16 ;
5505   UWord tmp___17 ;   5505   UWord tmp___17 ;
5506   long tmp___18 ;   5506   long tmp___18 ;
5507   long tmp___19 ;   5507   long tmp___19 ;
5508   long tmp___20 ;   5508   long tmp___20 ;
5509   long tmp___21 ;   5509   long tmp___21 ;
5510   Bool tmp___22 ;   5510   Bool tmp___22 ;
5511     5511  
5512   {   5512   {
5513   tst = (ThreadState volatile   *)((void *)0);   5513   tst = (ThreadState volatile   *)((void *)0);
5514   tmp = vgPlain_is_valid_tid(tid);   5514   tmp = vgPlain_is_valid_tid(tid);
5515   if (tmp) {   5515   if (tmp) {
5516     tmp___0 = 1;   5516     tmp___0 = 1;
5517   } else {   5517   } else {
5518     tmp___0 = 0;   5518     tmp___0 = 0;
5519   }   5519   }
5520   tmp___1 = __builtin_expect((long )tmp___0, 1L);   5520   tmp___1 = __builtin_expect((long )tmp___0, 1L);
5521   if (tmp___1) {   5521   if (tmp___1) {
5522     5522  
5523   } else {   5523   } else {
5524     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_valid_tid)(tid)",   5524     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_valid_tid)(tid)",
5525                         (Char const   *)"m_scheduler/scheduler.c", 721,   5525                         (Char const   *)"m_scheduler/scheduler.c", 721,
5526                         (Char const   *)"run_thread_for_a_while", "");   5526                         (Char const   *)"run_thread_for_a_while", "");
5527   }   5527   }
5528   tmp___2 = vgPlain_is_running_thread(tid);   5528   tmp___2 = vgPlain_is_running_thread(tid);
5529   if (tmp___2) {   5529   if (tmp___2) {
5530     tmp___3 = 1;   5530     tmp___3 = 1;
5531   } else {   5531   } else {
5532     tmp___3 = 0;   5532     tmp___3 = 0;
5533   }   5533   }
5534   tmp___4 = __builtin_expect((long )tmp___3, 1L);   5534   tmp___4 = __builtin_expect((long )tmp___3, 1L);
5535   if (tmp___4) {   5535   if (tmp___4) {
5536     5536  
5537   } else {   5537   } else {
5538     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(tid)",   5538     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(tid)",
5539                         (Char const   *)"m_scheduler/scheduler.c", 722,   5539                         (Char const   *)"m_scheduler/scheduler.c", 722,
5540                         (Char const   *)"run_thread_for_a_while", "");   5540                         (Char const   *)"run_thread_for_a_while", "");
5541   }   5541   }
5542   tmp___5 = vgPlain_is_exiting(tid);   5542   tmp___5 = vgPlain_is_exiting(tid);
5543   if (tmp___5) {   5543   if (tmp___5) {
5544     tmp___6 = 0;   5544     tmp___6 = 0;
5545   } else {   5545   } else {
5546     tmp___6 = 1;   5546     tmp___6 = 1;
5547   }   5547   }
5548   tmp___7 = __builtin_expect((long )tmp___6, 1L);   5548   tmp___7 = __builtin_expect((long )tmp___6, 1L);
5549   if (tmp___7) {   5549   if (tmp___7) {
5550     5550  
5551   } else {   5551   } else {
5552     vgPlain_assert_fail((Bool )1, (Char const   *)"!VG_(is_exiting)(tid)",   5552     vgPlain_assert_fail((Bool )1, (Char const   *)"!VG_(is_exiting)(tid)",
5553                         (Char const   *)"m_scheduler/scheduler.c", 723,   5553                         (Char const   *)"m_scheduler/scheduler.c", 723,
5554                         (Char const   *)"run_thread_for_a_while", "");   5554                         (Char const   *)"run_thread_for_a_while", "");
5555   }   5555   }
5556   tmp___8 = vgPlain_get_ThreadState(tid);   5556   tmp___8 = vgPlain_get_ThreadState(tid);
5557   tst = (ThreadState volatile   *)tmp___8;   5557   tst = (ThreadState volatile   *)tmp___8;
5558   do_pre_run_checks((ThreadState *)tst);   5558   do_pre_run_checks((ThreadState *)tst);
5559   trc = (UInt volatile   )0;   5559   trc = (UInt volatile   )0;
5560   dispatch_ctr_SAVED = (Int volatile   )vgPlain_dispatch_ctr;   5560   dispatch_ctr_SAVED = (Int volatile   )vgPlain_dispatch_ctr;
5561   while (1) {   5561   while (1) {
5562     if (vgPlain_tdict.track_start_client_code) {   5562     if (vgPlain_tdict.track_start_client_code) {
5563       (*(vgPlain_tdict.track_start_client_code))(tid, bbs_done);   5563       (*(vgPlain_tdict.track_start_client_code))(tid, bbs_done);
5564     } else {   5564     } else {
5565     5565  
5566     }   5566     }
5567     break;   5567     break;
5568   }   5568   }
5569   tmp___12 = __builtin_expect((long )(! (! ((int )vgPlain_in_generated_code == 0))),   5569   tmp___12 = __builtin_expect((long )(! (! ((int )vgPlain_in_generated_code == 0))),
5570                               1L);   5570                               1L);
5571   if (tmp___12) {   5571   if (tmp___12) {
5572     5572  
5573   } else {   5573   } else {
5574     vgPlain_assert_fail((Bool )1,   5574     vgPlain_assert_fail((Bool )1,
5575                         (Char const   *)"VG_(in_generated_code) == False",   5575                         (Char const   *)"VG_(in_generated_code) == False",
5576                         (Char const   *)"m_scheduler/scheduler.c", 765,   5576                         (Char const   *)"m_scheduler/scheduler.c", 765,
5577                         (Char const   *)"run_thread_for_a_while", "");   5577                         (Char const   *)"run_thread_for_a_while", "");
5578   }   5578   }
5579   vgPlain_in_generated_code = (Bool )1;   5579   vgPlain_in_generated_code = (Bool )1;
5580   while (1) {   5580   while (1) {
5581     tmp___13 = vgPlain_get_ThreadState(tid);   5581     tmp___13 = vgPlain_get_ThreadState(tid);
5582     _qq_tst = (ThreadState */* volatile  */)tmp___13;   5582     _qq_tst = (ThreadState */* volatile  */)tmp___13;
5583     tmp___14 = __builtin_setjmp(_qq_tst->sched_jmpbuf);   5583     tmp___14 = __builtin_setjmp(_qq_tst->sched_jmpbuf);
5584     jumped = (Int volatile   )tmp___14;   5584     jumped = (Int volatile   )tmp___14;
5585     if (jumped == (Int volatile   )0) {   5585     if (jumped == (Int volatile   )0) {
5586       tmp___15 = __builtin_expect((long )(! (! (! _qq_tst->sched_jmpbuf_valid))),   5586       tmp___15 = __builtin_expect((long )(! (! (! _qq_tst->sched_jmpbuf_valid))),
5587                                   1L);   5587                                   1L);
5588       if (tmp___15) {   5588       if (tmp___15) {
5589     5589  
5590       } else {   5590       } else {
5591         vgPlain_assert_fail((Bool )1,   5591         vgPlain_assert_fail((Bool )1,
5592                             (Char const   *)"!_qq_tst->sched_jmpbuf_valid",   5592                             (Char const   *)"!_qq_tst->sched_jmpbuf_valid",
5593                             (Char const   *)"m_scheduler/scheduler.c", 773,   5593                             (Char const   *)"m_scheduler/scheduler.c", 773,
5594                             (Char const   *)"run_thread_for_a_while", "");   5594                             (Char const   *)"run_thread_for_a_while", "");
5595       }   5595       }
5596       _qq_tst->sched_jmpbuf_valid = (Bool )1;   5596       _qq_tst->sched_jmpbuf_valid = (Bool )1;
5597       if ((int )vgPlain_clo_profile_flags > 0) {   5597       if ((int )vgPlain_clo_profile_flags > 0) {
5598         tmp___16 = 1;   5598         tmp___16 = 1;
5599       } else {   5599       } else {
5600         tmp___16 = 0;   5600         tmp___16 = 0;
5601       }   5601       }
5602       tmp___17 = vgPlain_run_innerloop((void *)(& tst->arch.vex),   5602       tmp___17 = vgPlain_run_innerloop((void *)(& tst->arch.vex),
5603                                        (UWord )tmp___16);   5603                                        (UWord )tmp___16);
5604       trc = (UInt volatile   )((UInt )tmp___17);   5604       trc = (UInt volatile   )((UInt )tmp___17);
5605     } else   5605     } else
5606     if (vgPlain_clo_trace_sched) {   5606     if (vgPlain_clo_trace_sched) {
5607       vgPlain_printf("SCHEDSETJMP(line %d) tid %d, jumped=%d\n", 773, tid,   5607       vgPlain_printf("SCHEDSETJMP(line %d) tid %d, jumped=%d\n", 773, tid,
5608                      jumped);   5608                      jumped);
5609     } else {   5609     } else {
5610     5610  
5611     }   5611     }
5612     tmp___18 = __builtin_expect((long )(! (! _qq_tst->sched_jmpbuf_valid)), 1L);   5612     tmp___18 = __builtin_expect((long )(! (! _qq_tst->sched_jmpbuf_valid)), 1L);
5613     if (tmp___18) {   5613     if (tmp___18) {
5614     5614  
5615     } else {   5615     } else {
5616       vgPlain_assert_fail((Bool )1,   5616       vgPlain_assert_fail((Bool )1,
5617                           (Char const   *)"_qq_tst->sched_jmpbuf_valid",   5617                           (Char const   *)"_qq_tst->sched_jmpbuf_valid",
5618                           (Char const   *)"m_scheduler/scheduler.c", 773,   5618                           (Char const   *)"m_scheduler/scheduler.c", 773,
5619                           (Char const   *)"run_thread_for_a_while", "");   5619                           (Char const   *)"run_thread_for_a_while", "");
5620     }   5620     }
5621     _qq_tst->sched_jmpbuf_valid = (Bool )0;   5621     _qq_tst->sched_jmpbuf_valid = (Bool )0;
5622     break;   5622     break;
5623   }   5623   }
5624   tmp___19 = __builtin_expect((long )(! (! ((int )vgPlain_in_generated_code == 1))),   5624   tmp___19 = __builtin_expect((long )(! (! ((int )vgPlain_in_generated_code == 1))),
5625                               1L);   5625                               1L);
5626   if (tmp___19) {   5626   if (tmp___19) {
5627     5627  
5628   } else {   5628   } else {
5629     vgPlain_assert_fail((Bool )1,   5629     vgPlain_assert_fail((Bool )1,
5630                         (Char const   *)"VG_(in_generated_code) == True",   5630                         (Char const   *)"VG_(in_generated_code) == True",
5631                         (Char const   *)"m_scheduler/scheduler.c", 775,   5631                         (Char const   *)"m_scheduler/scheduler.c", 775,
5632                         (Char const   *)"run_thread_for_a_while", "");   5632                         (Char const   *)"run_thread_for_a_while", "");
5633   }   5633   }
5634   vgPlain_in_generated_code = (Bool )0;   5634   vgPlain_in_generated_code = (Bool )0;
5635   if (jumped) {   5635   if (jumped) {
5636     tmp___20 = __builtin_expect((long )(! (! (trc == (UInt volatile   )0))), 1L);   5636     tmp___20 = __builtin_expect((long )(! (! (trc == (UInt volatile   )0))), 1L);
5637     if (tmp___20) {   5637     if (tmp___20) {
5638     5638  
5639     } else {   5639     } else {
5640       vgPlain_assert_fail((Bool )1, (Char const   *)"trc == 0",   5640       vgPlain_assert_fail((Bool )1, (Char const   *)"trc == 0",
5641                           (Char const   *)"m_scheduler/scheduler.c", 781,   5641                           (Char const   *)"m_scheduler/scheduler.c", 781,
5642                           (Char const   *)"run_thread_for_a_while", "");   5642                           (Char const   *)"run_thread_for_a_while", "");
5643     }   5643     }
5644     trc = (UInt volatile   )43;   5644     trc = (UInt volatile   )43;
5645     block_signals();   5645     block_signals();
5646   } else {   5646   } else {
5647     5647  
5648   }   5648   }
5649   done_this_time = (Int volatile   )((Int )dispatch_ctr_SAVED - (Int )vgPlain_dispatch_ctr);   5649   done_this_time = (Int volatile   )((Int )dispatch_ctr_SAVED - (Int )vgPlain_dispatch_ctr);
5650   tmp___21 = __builtin_expect((long )(! (! (done_this_time >= (Int volatile   )0))),   5650   tmp___21 = __builtin_expect((long )(! (! (done_this_time >= (Int volatile   )0))),
5651                               1L);   5651                               1L);
5652   if (tmp___21) {   5652   if (tmp___21) {
5653     5653  
5654   } else {   5654   } else {
5655     vgPlain_assert_fail((Bool )1, (Char const   *)"done_this_time >= 0",   5655     vgPlain_assert_fail((Bool )1, (Char const   *)"done_this_time >= 0",
5656                         (Char const   *)"m_scheduler/scheduler.c", 788,   5656                         (Char const   *)"m_scheduler/scheduler.c", 788,
5657                         (Char const   *)"run_thread_for_a_while", "");   5657                         (Char const   *)"run_thread_for_a_while", "");
5658   }   5658   }
5659   bbs_done += (ULong )done_this_time;   5659   bbs_done += (ULong )done_this_time;
5660   while (1) {   5660   while (1) {
5661     if (vgPlain_tdict.track_stop_client_code) {   5661     if (vgPlain_tdict.track_stop_client_code) {
5662       (*(vgPlain_tdict.track_stop_client_code))(tid, bbs_done);   5662       (*(vgPlain_tdict.track_stop_client_code))(tid, bbs_done);
5663     } else {   5663     } else {
5664     5664  
5665     }   5665     }
5666     break;   5666     break;
5667   }   5667   }
5668   if (bbs_done >= vgdb_next_poll) {   5668   if (bbs_done >= vgdb_next_poll) {
5669     if (vgPlain_clo_vgdb_poll) {   5669     if (vgPlain_clo_vgdb_poll) {
5670       vgdb_next_poll = bbs_done + (ULong )vgPlain_clo_vgdb_poll;   5670       vgdb_next_poll = bbs_done + (ULong )vgPlain_clo_vgdb_poll;
5671     } else {   5671     } else {
5672       vgdb_next_poll = 0xffffffffffffffffULL;   5672       vgdb_next_poll = 0xffffffffffffffffULL;
5673     }   5673     }
5674     tmp___22 = vgPlain_gdbserver_activity(tid);   5674     tmp___22 = vgPlain_gdbserver_activity(tid);
5675     if (tmp___22) {   5675     if (tmp___22) {
5676       vgPlain_gdbserver(tid);   5676       vgPlain_gdbserver(tid);
5677     } else {   5677     } else {
5678     5678  
5679     }   5679     }
5680   } else {   5680   } else {
5681     5681  
5682   }   5682   }
5683   return ((UInt )trc);   5683   return ((UInt )trc);
5684 }   5684 }
5685 }   5685 }
5686 static UInt run_noredir_translation(Addr hcode , ThreadId tid )   5686 static UInt run_noredir_translation(Addr hcode , ThreadId tid )
5687 {   5687 {
5688   Int volatile   jumped ;   5688   Int volatile   jumped ;
5689   ThreadState volatile   *tst ;   5689   ThreadState volatile   *tst ;
5690   UWord volatile   argblock[4] ;   5690   UWord volatile   argblock[4] ;
5691   UInt volatile   retval ;   5691   UInt volatile   retval ;
5692   Bool tmp ;   5692   Bool tmp ;
5693   int tmp___0 ;   5693   int tmp___0 ;
5694   long tmp___1 ;   5694   long tmp___1 ;
5695   Bool tmp___2 ;   5695   Bool tmp___2 ;
5696   int tmp___3 ;   5696   int tmp___3 ;
5697   long tmp___4 ;   5697   long tmp___4 ;
5698   Bool tmp___5 ;   5698   Bool tmp___5 ;
5699   int tmp___6 ;   5699   int tmp___6 ;
5700   long tmp___7 ;   5700   long tmp___7 ;
5701   ThreadState *tmp___8 ;   5701   ThreadState *tmp___8 ;
5702   long tmp___9 ;   5702   long tmp___9 ;
5703   ThreadState * volatile  _qq_tst ;   5703   ThreadState * volatile  _qq_tst ;
5704   ThreadState *tmp___10 ;   5704   ThreadState *tmp___10 ;
5705   int tmp___11 ;   5705   int tmp___11 ;
5706   long tmp___12 ;   5706   long tmp___12 ;
5707   long tmp___13 ;   5707   long tmp___13 ;
5708   long tmp___14 ;   5708   long tmp___14 ;
5709   long tmp___15 ;   5709   long tmp___15 ;
5710     5710  
5711   {   5711   {
5712   tmp = vgPlain_is_valid_tid(tid);   5712   tmp = vgPlain_is_valid_tid(tid);
5713   if (tmp) {   5713   if (tmp) {
5714     tmp___0 = 1;   5714     tmp___0 = 1;
5715   } else {   5715   } else {
5716     tmp___0 = 0;   5716     tmp___0 = 0;
5717   }   5717   }
5718   tmp___1 = __builtin_expect((long )tmp___0, 1L);   5718   tmp___1 = __builtin_expect((long )tmp___0, 1L);
5719   if (tmp___1) {   5719   if (tmp___1) {
5720     5720  
5721   } else {   5721   } else {
5722     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_valid_tid)(tid)",   5722     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_valid_tid)(tid)",
5723                         (Char const   *)"m_scheduler/scheduler.c", 818,   5723                         (Char const   *)"m_scheduler/scheduler.c", 818,
5724                         (Char const   *)"run_noredir_translation", "");   5724                         (Char const   *)"run_noredir_translation", "");
5725   }   5725   }
5726   tmp___2 = vgPlain_is_running_thread(tid);   5726   tmp___2 = vgPlain_is_running_thread(tid);
5727   if (tmp___2) {   5727   if (tmp___2) {
5728     tmp___3 = 1;   5728     tmp___3 = 1;
5729   } else {   5729   } else {
5730     tmp___3 = 0;   5730     tmp___3 = 0;
5731   }   5731   }
5732   tmp___4 = __builtin_expect((long )tmp___3, 1L);   5732   tmp___4 = __builtin_expect((long )tmp___3, 1L);
5733   if (tmp___4) {   5733   if (tmp___4) {
5734     5734  
5735   } else {   5735   } else {
5736     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(tid)",   5736     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(tid)",
5737                         (Char const   *)"m_scheduler/scheduler.c", 819,   5737                         (Char const   *)"m_scheduler/scheduler.c", 819,
5738                         (Char const   *)"run_noredir_translation", "");   5738                         (Char const   *)"run_noredir_translation", "");
5739   }   5739   }
5740   tmp___5 = vgPlain_is_exiting(tid);   5740   tmp___5 = vgPlain_is_exiting(tid);
5741   if (tmp___5) {   5741   if (tmp___5) {
5742     tmp___6 = 0;   5742     tmp___6 = 0;
5743   } else {   5743   } else {
5744     tmp___6 = 1;   5744     tmp___6 = 1;
5745   }   5745   }
5746   tmp___7 = __builtin_expect((long )tmp___6, 1L);   5746   tmp___7 = __builtin_expect((long )tmp___6, 1L);
5747   if (tmp___7) {   5747   if (tmp___7) {
5748     5748  
5749   } else {   5749   } else {
5750     vgPlain_assert_fail((Bool )1, (Char const   *)"!VG_(is_exiting)(tid)",   5750     vgPlain_assert_fail((Bool )1, (Char const   *)"!VG_(is_exiting)(tid)",
5751                         (Char const   *)"m_scheduler/scheduler.c", 820,   5751                         (Char const   *)"m_scheduler/scheduler.c", 820,
5752                         (Char const   *)"run_noredir_translation", "");   5752                         (Char const   *)"run_noredir_translation", "");
5753   }   5753   }
5754   tmp___8 = vgPlain_get_ThreadState(tid);   5754   tmp___8 = vgPlain_get_ThreadState(tid);
5755   tst = (ThreadState volatile   *)tmp___8;   5755   tst = (ThreadState volatile   *)tmp___8;
5756   do_pre_run_checks((ThreadState *)tst);   5756   do_pre_run_checks((ThreadState *)tst);
5757   argblock[0] = (UWord volatile   )hcode;   5757   argblock[0] = (UWord volatile   )hcode;
5758   argblock[1] = (UWord volatile   )((UWord )(& vgPlain_threads[tid].arch.vex));   5758   argblock[1] = (UWord volatile   )((UWord )(& vgPlain_threads[tid].arch.vex));
5759   argblock[2] = (UWord volatile   )0;   5759   argblock[2] = (UWord volatile   )0;
5760   argblock[3] = (UWord volatile   )0;   5760   argblock[3] = (UWord volatile   )0;
5761   while (1) {   5761   while (1) {
5762     if (vgPlain_tdict.track_start_client_code) {   5762     if (vgPlain_tdict.track_start_client_code) {
5763       (*(vgPlain_tdict.track_start_client_code))(tid, bbs_done);   5763       (*(vgPlain_tdict.track_start_client_code))(tid, bbs_done);
5764     } else {   5764     } else {
5765     5765  
5766     }   5766     }
5767     break;   5767     break;
5768   }   5768   }
5769   tmp___9 = __builtin_expect((long )(! (! ((int )vgPlain_in_generated_code == 0))),   5769   tmp___9 = __builtin_expect((long )(! (! ((int )vgPlain_in_generated_code == 0))),
5770                              1L);   5770                              1L);
5771   if (tmp___9) {   5771   if (tmp___9) {
5772     5772  
5773   } else {   5773   } else {
5774     vgPlain_assert_fail((Bool )1,   5774     vgPlain_assert_fail((Bool )1,
5775                         (Char const   *)"VG_(in_generated_code) == False",   5775                         (Char const   *)"VG_(in_generated_code) == False",
5776                         (Char const   *)"m_scheduler/scheduler.c", 853,   5776                         (Char const   *)"m_scheduler/scheduler.c", 853,
5777                         (Char const   *)"run_noredir_translation", "");   5777                         (Char const   *)"run_noredir_translation", "");
5778   }   5778   }
5779   vgPlain_in_generated_code = (Bool )1;   5779   vgPlain_in_generated_code = (Bool )1;
5780   while (1) {   5780   while (1) {
5781     tmp___10 = vgPlain_get_ThreadState(tid);   5781     tmp___10 = vgPlain_get_ThreadState(tid);
5782     _qq_tst = (ThreadState */* volatile  */)tmp___10;   5782     _qq_tst = (ThreadState */* volatile  */)tmp___10;
5783     tmp___11 = __builtin_setjmp(_qq_tst->sched_jmpbuf);   5783     tmp___11 = __builtin_setjmp(_qq_tst->sched_jmpbuf);
5784     jumped = (Int volatile   )tmp___11;   5784     jumped = (Int volatile   )tmp___11;
5785     if (jumped == (Int volatile   )0) {   5785     if (jumped == (Int volatile   )0) {
5786       tmp___12 = __builtin_expect((long )(! (! (! _qq_tst->sched_jmpbuf_valid))),   5786       tmp___12 = __builtin_expect((long )(! (! (! _qq_tst->sched_jmpbuf_valid))),
5787                                   1L);   5787                                   1L);
5788       if (tmp___12) {   5788       if (tmp___12) {
5789     5789  
5790       } else {   5790       } else {
5791         vgPlain_assert_fail((Bool )1,   5791         vgPlain_assert_fail((Bool )1,
5792                             (Char const   *)"!_qq_tst->sched_jmpbuf_valid",   5792                             (Char const   *)"!_qq_tst->sched_jmpbuf_valid",
5793                             (Char const   *)"m_scheduler/scheduler.c", 860,   5793                             (Char const   *)"m_scheduler/scheduler.c", 860,
5794                             (Char const   *)"run_noredir_translation", "");   5794                             (Char const   *)"run_noredir_translation", "");
5795       }   5795       }
5796       _qq_tst->sched_jmpbuf_valid = (Bool )1;   5796       _qq_tst->sched_jmpbuf_valid = (Bool )1;
5797       vgPlain_run_a_noredir_translation(& argblock[0]);   5797       vgPlain_run_a_noredir_translation(& argblock[0]);
5798     } else   5798     } else
5799     if (vgPlain_clo_trace_sched) {   5799     if (vgPlain_clo_trace_sched) {
5800       vgPlain_printf("SCHEDSETJMP(line %d) tid %d, jumped=%d\n", 860, tid,   5800       vgPlain_printf("SCHEDSETJMP(line %d) tid %d, jumped=%d\n", 860, tid,
5801                      jumped);   5801                      jumped);
5802     } else {   5802     } else {
5803     5803  
5804     }   5804     }
5805     tmp___13 = __builtin_expect((long )(! (! _qq_tst->sched_jmpbuf_valid)), 1L);   5805     tmp___13 = __builtin_expect((long )(! (! _qq_tst->sched_jmpbuf_valid)), 1L);
5806     if (tmp___13) {   5806     if (tmp___13) {
5807     5807  
5808     } else {   5808     } else {
5809       vgPlain_assert_fail((Bool )1,   5809       vgPlain_assert_fail((Bool )1,
5810                           (Char const   *)"_qq_tst->sched_jmpbuf_valid",   5810                           (Char const   *)"_qq_tst->sched_jmpbuf_valid",
5811                           (Char const   *)"m_scheduler/scheduler.c", 860,   5811                           (Char const   *)"m_scheduler/scheduler.c", 860,
5812                           (Char const   *)"run_noredir_translation", "");   5812                           (Char const   *)"run_noredir_translation", "");
5813     }   5813     }
5814     _qq_tst->sched_jmpbuf_valid = (Bool )0;   5814     _qq_tst->sched_jmpbuf_valid = (Bool )0;
5815     break;   5815     break;
5816   }   5816   }
5817   vgPlain_in_generated_code = (Bool )0;   5817   vgPlain_in_generated_code = (Bool )0;
5818   if (jumped) {   5818   if (jumped) {
5819     tmp___14 = __builtin_expect((long )(! (! (argblock[2] == (UWord volatile   )0))),   5819     tmp___14 = __builtin_expect((long )(! (! (argblock[2] == (UWord volatile   )0))),
5820                                 1L);   5820                                 1L);
5821     if (tmp___14) {   5821     if (tmp___14) {
5822     5822  
5823     } else {   5823     } else {
5824       vgPlain_assert_fail((Bool )1, (Char const   *)"argblock[2] == 0",   5824       vgPlain_assert_fail((Bool )1, (Char const   *)"argblock[2] == 0",
5825                           (Char const   *)"m_scheduler/scheduler.c", 867,   5825                           (Char const   *)"m_scheduler/scheduler.c", 867,
5826                           (Char const   *)"run_noredir_translation", "");   5826                           (Char const   *)"run_noredir_translation", "");
5827     }   5827     }
5828     tmp___15 = __builtin_expect((long )(! (! (argblock[3] == (UWord volatile   )0))),   5828     tmp___15 = __builtin_expect((long )(! (! (argblock[3] == (UWord volatile   )0))),
5829                                 1L);   5829                                 1L);
5830     if (tmp___15) {   5830     if (tmp___15) {
5831     5831  
5832     } else {   5832     } else {
5833       vgPlain_assert_fail((Bool )1, (Char const   *)"argblock[3] == 0",   5833       vgPlain_assert_fail((Bool )1, (Char const   *)"argblock[3] == 0",
5834                           (Char const   *)"m_scheduler/scheduler.c", 868,   5834                           (Char const   *)"m_scheduler/scheduler.c", 868,
5835                           (Char const   *)"run_noredir_translation", "");   5835                           (Char const   *)"run_noredir_translation", "");
5836     }   5836     }
5837     block_signals();   5837     block_signals();
5838     retval = (UInt volatile   )43;   5838     retval = (UInt volatile   )43;
5839   } else {   5839   } else {
5840     vgPlain_set_IP(tid, (Addr )argblock[2]);   5840     vgPlain_set_IP(tid, (Addr )argblock[2]);
5841     if (argblock[3] == argblock[1]) {   5841     if (argblock[3] == argblock[1]) {
5842       retval = (UInt volatile   )29;   5842       retval = (UInt volatile   )29;
5843     } else {   5843     } else {
5844       retval = (UInt volatile   )((UInt )argblock[3]);   5844       retval = (UInt volatile   )((UInt )argblock[3]);
5845     }   5845     }
5846   }   5846   }
5847   bbs_done ++;   5847   bbs_done ++;
5848   while (1) {   5848   while (1) {
5849     if (vgPlain_tdict.track_stop_client_code) {   5849     if (vgPlain_tdict.track_stop_client_code) {
5850       (*(vgPlain_tdict.track_stop_client_code))(tid, bbs_done);   5850       (*(vgPlain_tdict.track_stop_client_code))(tid, bbs_done);
5851     } else {   5851     } else {
5852     5852  
5853     }   5853     }
5854     break;   5854     break;
5855   }   5855   }
5856   return ((UInt )retval);   5856   return ((UInt )retval);
5857 }   5857 }
5858 }   5858 }
5859 ULong vgPlain_bbs_done(void)   5859 ULong vgPlain_bbs_done(void)
5860 {   5860 {
5861     5861  
5862     5862  
5863   {   5863   {
5864   return (bbs_done);   5864   return (bbs_done);
5865 }   5865 }
5866 }   5866 }
5867 static void handle_tt_miss(ThreadId tid )   5867 static void handle_tt_miss(ThreadId tid )
5868 {   5868 {
5869   Bool found ;   5869   Bool found ;
5870   Addr ip ;   5870   Addr ip ;
5871   Addr tmp ;   5871   Addr tmp ;
5872   long tmp___0 ;   5872   long tmp___0 ;
5873   Bool tmp___1 ;   5873   Bool tmp___1 ;
5874   long tmp___2 ;   5874   long tmp___2 ;
5875     5875  
5876   {   5876   {
5877   tmp = vgPlain_get_IP(tid);   5877   tmp = vgPlain_get_IP(tid);
5878   ip = tmp;   5878   ip = tmp;
5879   found = vgPlain_search_transtab((AddrH *)((void *)0), (Addr64 )ip, (Bool )1);   5879   found = vgPlain_search_transtab((AddrH *)((void *)0), (Addr64 )ip, (Bool )1);
5880   tmp___2 = __builtin_expect((long )(! (! (! found))), 0L);   5880   tmp___2 = __builtin_expect((long )(! (! (! found))), 0L);
5881   if (tmp___2) {   5881   if (tmp___2) {
5882     tmp___1 = vgPlain_translate(tid, (Addr64 )ip, (Bool )0, 0, bbs_done,   5882     tmp___1 = vgPlain_translate(tid, (Addr64 )ip, (Bool )0, 0, bbs_done,
5883                                 (Bool )1);   5883                                 (Bool )1);
5884     if (tmp___1) {   5884     if (tmp___1) {
5885       found = vgPlain_search_transtab((AddrH *)((void *)0), (Addr64 )ip,   5885       found = vgPlain_search_transtab((AddrH *)((void *)0), (Addr64 )ip,
5886                                       (Bool )1);   5886                                       (Bool )1);
5887       tmp___0 = __builtin_expect((long )(! (! found)), 1L);   5887       tmp___0 = __builtin_expect((long )(! (! found)), 1L);
5888       if (tmp___0) {   5888       if (tmp___0) {
5889     5889  
5890       } else {   5890       } else {
5891         vgPlain_assert_fail((Bool )1, (Char const   *)"found",   5891         vgPlain_assert_fail((Bool )1, (Char const   *)"found",
5892                             (Char const   *)"m_scheduler/scheduler.c", 912,   5892                             (Char const   *)"m_scheduler/scheduler.c", 912,
5893                             (Char const   *)"handle_tt_miss",   5893                             (Char const   *)"handle_tt_miss",
5894                             "VG_TRC_INNER_FASTMISS: missing tt_fast entry");   5894                             "VG_TRC_INNER_FASTMISS: missing tt_fast entry");
5895       }   5895       }
5896     } else {   5896     } else {
5897     5897  
5898     }   5898     }
5899   } else {   5899   } else {
5900     5900  
5901   }   5901   }
5902   return;   5902   return;
5903 }   5903 }
5904 }   5904 }
5905 static void handle_syscall(ThreadId tid , UInt trc )   5905 static void handle_syscall(ThreadId tid , UInt trc )
5906 {   5906 {
5907   ThreadState * volatile  tst ;   5907   ThreadState * volatile  tst ;
5908   ThreadState *tmp ;   5908   ThreadState *tmp ;
5909   Bool jumped ;   5909   Bool jumped ;
5910   ThreadState * volatile  _qq_tst ;   5910   ThreadState * volatile  _qq_tst ;
5911   ThreadState *tmp___0 ;   5911   ThreadState *tmp___0 ;
5912   int tmp___1 ;   5912   int tmp___1 ;
5913   long tmp___2 ;   5913   long tmp___2 ;
5914   long tmp___3 ;   5914   long tmp___3 ;
5915   Bool tmp___4 ;   5915   Bool tmp___4 ;
5916   Bool tmp___5 ;   5916   Bool tmp___5 ;
5917   int tmp___6 ;   5917   int tmp___6 ;
5918   long tmp___7 ;   5918   long tmp___7 ;
5919     5919  
5920   {   5920   {
5921   tmp = vgPlain_get_ThreadState(tid);   5921   tmp = vgPlain_get_ThreadState(tid);
5922   tst = (ThreadState */* volatile  */)tmp;   5922   tst = (ThreadState */* volatile  */)tmp;
5923   if (vgPlain_clo_sanity_level >= 3) {   5923   if (vgPlain_clo_sanity_level >= 3) {
5924     vgPlain_am_do_sync_check("(BEFORE SYSCALL)", "m_scheduler/scheduler.c", 935);   5924     vgPlain_am_do_sync_check("(BEFORE SYSCALL)", "m_scheduler/scheduler.c", 935);
5925   } else {   5925   } else {
5926     5926  
5927   }   5927   }
5928   while (1) {   5928   while (1) {
5929     tmp___0 = vgPlain_get_ThreadState(tid);   5929     tmp___0 = vgPlain_get_ThreadState(tid);
5930     _qq_tst = (ThreadState */* volatile  */)tmp___0;   5930     _qq_tst = (ThreadState */* volatile  */)tmp___0;
5931     tmp___1 = __builtin_setjmp(_qq_tst->sched_jmpbuf);   5931     tmp___1 = __builtin_setjmp(_qq_tst->sched_jmpbuf);
5932     jumped = (Bool )tmp___1;   5932     jumped = (Bool )tmp___1;
5933     if ((int )jumped == 0) {   5933     if ((int )jumped == 0) {
5934       tmp___2 = __builtin_expect((long )(! (! (! _qq_tst->sched_jmpbuf_valid))),   5934       tmp___2 = __builtin_expect((long )(! (! (! _qq_tst->sched_jmpbuf_valid))),
5935                                  1L);   5935                                  1L);
5936       if (tmp___2) {   5936       if (tmp___2) {
5937     5937  
5938       } else {   5938       } else {
5939         vgPlain_assert_fail((Bool )1,   5939         vgPlain_assert_fail((Bool )1,
5940                             (Char const   *)"!_qq_tst->sched_jmpbuf_valid",   5940                             (Char const   *)"!_qq_tst->sched_jmpbuf_valid",
5941                             (Char const   *)"m_scheduler/scheduler.c", 937,   5941                             (Char const   *)"m_scheduler/scheduler.c", 937,
5942                             (Char const   *)"handle_syscall", "");   5942                             (Char const   *)"handle_syscall", "");
5943       }   5943       }
5944       _qq_tst->sched_jmpbuf_valid = (Bool )1;   5944       _qq_tst->sched_jmpbuf_valid = (Bool )1;
5945       vgPlain_client_syscall(tid, trc);   5945       vgPlain_client_syscall(tid, trc);
5946     } else   5946     } else
5947     if (vgPlain_clo_trace_sched) {   5947     if (vgPlain_clo_trace_sched) {
5948       vgPlain_printf("SCHEDSETJMP(line %d) tid %d, jumped=%d\n", 937, tid,   5948       vgPlain_printf("SCHEDSETJMP(line %d) tid %d, jumped=%d\n", 937, tid,
5949                      (int )jumped);   5949                      (int )jumped);
5950     } else {   5950     } else {
5951     5951  
5952     }   5952     }
5953     tmp___3 = __builtin_expect((long )(! (! _qq_tst->sched_jmpbuf_valid)), 1L);   5953     tmp___3 = __builtin_expect((long )(! (! _qq_tst->sched_jmpbuf_valid)), 1L);
5954     if (tmp___3) {   5954     if (tmp___3) {
5955     5955  
5956     } else {   5956     } else {
5957       vgPlain_assert_fail((Bool )1,   5957       vgPlain_assert_fail((Bool )1,
5958                           (Char const   *)"_qq_tst->sched_jmpbuf_valid",   5958                           (Char const   *)"_qq_tst->sched_jmpbuf_valid",
5959                           (Char const   *)"m_scheduler/scheduler.c", 937,   5959                           (Char const   *)"m_scheduler/scheduler.c", 937,
5960                           (Char const   *)"handle_syscall", "");   5960                           (Char const   *)"handle_syscall", "");
5961     }   5961     }
5962     _qq_tst->sched_jmpbuf_valid = (Bool )0;   5962     _qq_tst->sched_jmpbuf_valid = (Bool )0;
5963     break;   5963     break;
5964   }   5964   }
5965   if (vgPlain_clo_sanity_level >= 3) {   5965   if (vgPlain_clo_sanity_level >= 3) {
5966     vgPlain_am_do_sync_check("(AFTER SYSCALL)", "m_scheduler/scheduler.c", 940);   5966     vgPlain_am_do_sync_check("(AFTER SYSCALL)", "m_scheduler/scheduler.c", 940);
5967   } else {   5967   } else {
5968     5968  
5969   }   5969   }
5970   tmp___4 = vgPlain_is_running_thread(tid);   5970   tmp___4 = vgPlain_is_running_thread(tid);
5971   if (tmp___4) {   5971   if (tmp___4) {
5972     5972  
5973   } else {   5973   } else {
5974     vgPlain_printf("tid %d not running; VG_(running_tid)=%d, tid %d status %d\n",   5974     vgPlain_printf("tid %d not running; VG_(running_tid)=%d, tid %d status %d\n",
5975                    tid, vgPlain_running_tid, tid, (unsigned int )tst->status);   5975                    tid, vgPlain_running_tid, tid, (unsigned int )tst->status);
5976   }   5976   }
5977   tmp___5 = vgPlain_is_running_thread(tid);   5977   tmp___5 = vgPlain_is_running_thread(tid);
5978   if (tmp___5) {   5978   if (tmp___5) {
5979     tmp___6 = 1;   5979     tmp___6 = 1;
5980   } else {   5980   } else {
5981     tmp___6 = 0;   5981     tmp___6 = 0;
5982   }   5982   }
5983   tmp___7 = __builtin_expect((long )tmp___6, 1L);   5983   tmp___7 = __builtin_expect((long )tmp___6, 1L);
5984   if (tmp___7) {   5984   if (tmp___7) {
5985     5985  
5986   } else {   5986   } else {
5987     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(tid)",   5987     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(tid)",
5988                         (Char const   *)"m_scheduler/scheduler.c", 945,   5988                         (Char const   *)"m_scheduler/scheduler.c", 945,
5989                         (Char const   *)"handle_syscall", "");   5989                         (Char const   *)"handle_syscall", "");
5990   }   5990   }
5991   if (jumped) {   5991   if (jumped) {
5992     block_signals();   5992     block_signals();
5993     vgPlain_poll_signals(tid);   5993     vgPlain_poll_signals(tid);
5994   } else {   5994   } else {
5995     5995  
5996   }   5996   }
5997   return;   5997   return;
5998 }   5998 }
5999 }   5999 }
6000 static UInt handle_noredir_jump(ThreadId tid )   6000 static UInt handle_noredir_jump(ThreadId tid )
6001 {   6001 {
6002   AddrH hcode ;   6002   AddrH hcode ;
6003   Addr ip ;   6003   Addr ip ;
6004   Addr tmp ;   6004   Addr tmp ;
6005   Bool found ;   6005   Bool found ;
6006   Bool tmp___0 ;   6006   Bool tmp___0 ;
6007   long tmp___1 ;   6007   long tmp___1 ;
6008   Bool tmp___2 ;   6008   Bool tmp___2 ;
6009   long tmp___3 ;   6009   long tmp___3 ;
6010   long tmp___4 ;   6010   long tmp___4 ;
6011   UInt tmp___5 ;   6011   UInt tmp___5 ;
6012     6012  
6013   {   6013   {
6014   hcode = (AddrH )0;   6014   hcode = (AddrH )0;
6015   tmp = vgPlain_get_IP(tid);   6015   tmp = vgPlain_get_IP(tid);
6016   ip = tmp;   6016   ip = tmp;
6017   tmp___0 = vgPlain_search_unredir_transtab(& hcode, (Addr64 )ip);   6017   tmp___0 = vgPlain_search_unredir_transtab(& hcode, (Addr64 )ip);
6018   found = tmp___0;   6018   found = tmp___0;
6019   if (! found) {   6019   if (! found) {
6020     tmp___2 = vgPlain_translate(tid, (Addr64 )ip, (Bool )0, 0, bbs_done,   6020     tmp___2 = vgPlain_translate(tid, (Addr64 )ip, (Bool )0, 0, bbs_done,
6021                                 (Bool )0);   6021                                 (Bool )0);
6022     if (tmp___2) {   6022     if (tmp___2) {
6023       found = vgPlain_search_unredir_transtab(& hcode, (Addr64 )ip);   6023       found = vgPlain_search_unredir_transtab(& hcode, (Addr64 )ip);
6024       tmp___1 = __builtin_expect((long )(! (! found)), 1L);   6024       tmp___1 = __builtin_expect((long )(! (! found)), 1L);
6025       if (tmp___1) {   6025       if (tmp___1) {
6026     6026  
6027       } else {   6027       } else {
6028         vgPlain_assert_fail((Bool )1, (Char const   *)"found",   6028         vgPlain_assert_fail((Bool )1, (Char const   *)"found",
6029                             (Char const   *)"m_scheduler/scheduler.c", 968,   6029                             (Char const   *)"m_scheduler/scheduler.c", 968,
6030                             (Char const   *)"handle_noredir_jump",   6030                             (Char const   *)"handle_noredir_jump",
6031                             "unredir translation missing after creation?!");   6031                             "unredir translation missing after creation?!");
6032       }   6032       }
6033     } else {   6033     } else {
6034       return ((UInt )29);   6034       return ((UInt )29);
6035     }   6035     }
6036   } else {   6036   } else {
6037     6037  
6038   }   6038   }
6039   tmp___3 = __builtin_expect((long )(! (! found)), 1L);   6039   tmp___3 = __builtin_expect((long )(! (! found)), 1L);
6040   if (tmp___3) {   6040   if (tmp___3) {
6041     6041  
6042   } else {   6042   } else {
6043     vgPlain_assert_fail((Bool )1, (Char const   *)"found",   6043     vgPlain_assert_fail((Bool )1, (Char const   *)"found",
6044                         (Char const   *)"m_scheduler/scheduler.c", 981,   6044                         (Char const   *)"m_scheduler/scheduler.c", 981,
6045                         (Char const   *)"handle_noredir_jump", "");   6045                         (Char const   *)"handle_noredir_jump", "");
6046   }   6046   }
6047   tmp___4 = __builtin_expect((long )(! (! (hcode != 0UL))), 1L);   6047   tmp___4 = __builtin_expect((long )(! (! (hcode != 0UL))), 1L);
6048   if (tmp___4) {   6048   if (tmp___4) {
6049     6049  
6050   } else {   6050   } else {
6051     vgPlain_assert_fail((Bool )1, (Char const   *)"hcode != 0",   6051     vgPlain_assert_fail((Bool )1, (Char const   *)"hcode != 0",
6052                         (Char const   *)"m_scheduler/scheduler.c", 982,   6052                         (Char const   *)"m_scheduler/scheduler.c", 982,
6053                         (Char const   *)"handle_noredir_jump", "");   6053                         (Char const   *)"handle_noredir_jump", "");
6054   }   6054   }
6055   tmp___5 = run_noredir_translation(hcode, tid);   6055   tmp___5 = run_noredir_translation(hcode, tid);
6056   return (tmp___5);   6056   return (tmp___5);
6057 }   6057 }
6058 }   6058 }
6059 VgSchedReturnCode vgPlain_scheduler(ThreadId tid ) ;   6059 VgSchedReturnCode vgPlain_scheduler(ThreadId tid ) ;
6060 static Bool vgdb_startup_action_done  =    (Bool )0;   6060 static Bool vgdb_startup_action_done  =    (Bool )0;
6061 static Int counts[10]  ;   6061 static Int counts[10]  ;
6062 VgSchedReturnCode vgPlain_scheduler(ThreadId tid ) ;   6062 VgSchedReturnCode vgPlain_scheduler(ThreadId tid ) ;
6063 static Bool counts_initted  =    (Bool )0;   6063 static Bool counts_initted  =    (Bool )0;
6064 VgSchedReturnCode vgPlain_scheduler(ThreadId tid )   6064 VgSchedReturnCode vgPlain_scheduler(ThreadId tid )
6065 {   6065 {
6066   UInt trc ;   6066   UInt trc ;
6067   ThreadState *tst ;   6067   ThreadState *tst ;
6068   ThreadState *tmp ;   6068   ThreadState *tmp ;
6069   long tmp___0 ;   6069   long tmp___0 ;
6070   long tmp___1 ;   6070   long tmp___1 ;
6071   Bool tmp___2 ;   6071   Bool tmp___2 ;
6072   int tmp___3 ;   6072   int tmp___3 ;
6073   long tmp___4 ;   6073   long tmp___4 ;
6074   Bool tmp___5 ;   6074   Bool tmp___5 ;
6075   long tmp___6 ;   6075   long tmp___6 ;
6076   Int tmp___7 ;   6076   Int tmp___7 ;
6077   int tmp___8 ;   6077   int tmp___8 ;
6078   long tmp___9 ;   6078   long tmp___9 ;
6079   Char buf[50] ;   6079   Char buf[50] ;
6080   HChar *tmp___10 ;   6080   HChar *tmp___10 ;
6081   long tmp___11 ;   6081   long tmp___11 ;
6082   long tmp___12 ;   6082   long tmp___12 ;
6083   long tmp___13 ;   6083   long tmp___13 ;
6084   VexEmWarn ew ;   6084   VexEmWarn ew ;
6085   HChar *what ;   6085   HChar *what ;
6086   Bool show ;   6086   Bool show ;
6087   Int q ;   6087   Int q ;
6088   HChar *tmp___14 ;   6088   HChar *tmp___14 ;
6089   Int tmp___15 ;   6089   Int tmp___15 ;
6090   VexEmWarn ew___0 ;   6090   VexEmWarn ew___0 ;
6091   HChar *what___0 ;   6091   HChar *what___0 ;
6092   HChar *tmp___16 ;   6092   HChar *tmp___16 ;
6093   Addr tmp___17 ;   6093   Addr tmp___17 ;
6094   Addr tmp___18 ;   6094   Addr tmp___18 ;
6095   long tmp___19 ;   6095   long tmp___19 ;
6096   long tmp___20 ;   6096   long tmp___20 ;
6097   long tmp___21 ;   6097   long tmp___21 ;
6098   Bool tmp___22 ;   6098   Bool tmp___22 ;
6099   Bool tmp___23 ;   6099   Bool tmp___23 ;
6100   int tmp___24 ;   6100   int tmp___24 ;
6101   long tmp___25 ;   6101   long tmp___25 ;
6102     6102  
6103   {   6103   {
6104   tmp = vgPlain_get_ThreadState(tid);   6104   tmp = vgPlain_get_ThreadState(tid);
6105   tst = tmp;   6105   tst = tmp;
6106   if (vgPlain_clo_trace_sched) {   6106   if (vgPlain_clo_trace_sched) {
6107     print_sched_event(tid, (Char *)"entering VG_(scheduler)");   6107     print_sched_event(tid, (Char *)"entering VG_(scheduler)");
6108   } else {   6108   } else {
6109     6109  
6110   }   6110   }
6111   if (! vgdb_startup_action_done) {   6111   if (! vgdb_startup_action_done) {
6112     tmp___0 = __builtin_expect((long )(! (! (tid == 1U))), 1L);   6112     tmp___0 = __builtin_expect((long )(! (! (tid == 1U))), 1L);
6113     if (tmp___0) {   6113     if (tmp___0) {
6114     6114  
6115     } else {   6115     } else {
6116       vgPlain_assert_fail((Bool )1, (Char const   *)"tid == 1",   6116       vgPlain_assert_fail((Bool )1, (Char const   *)"tid == 1",
6117                           (Char const   *)"m_scheduler/scheduler.c", 1030,   6117                           (Char const   *)"m_scheduler/scheduler.c", 1030,
6118                           (Char const   *)"vgPlain_scheduler", "");   6118                           (Char const   *)"vgPlain_scheduler", "");
6119     }   6119     }
6120     vgdb_startup_action_done = (Bool )1;   6120     vgdb_startup_action_done = (Bool )1;
6121     if ((unsigned int )vgPlain_clo_vgdb != 0U) {   6121     if ((unsigned int )vgPlain_clo_vgdb != 0U) {
6122       if (vgPlain_clo_vgdb_poll) {   6122       if (vgPlain_clo_vgdb_poll) {
6123         vgPlain_force_vgdb_poll();   6123         vgPlain_force_vgdb_poll();
6124       } else {   6124       } else {
6125         vgPlain_disable_vgdb_poll();   6125         vgPlain_disable_vgdb_poll();
6126       }   6126       }
6127       tmp___1 = __builtin_expect((long )(! (! (vgPlain_dyn_vgdb_error == vgPlain_clo_vgdb_error))),   6127       tmp___1 = __builtin_expect((long )(! (! (vgPlain_dyn_vgdb_error == vgPlain_clo_vgdb_error))),
6128                                  1L);   6128                                  1L);
6129       if (tmp___1) {   6129       if (tmp___1) {
6130     6130  
6131       } else {   6131       } else {
6132         vgPlain_assert_fail((Bool )1,   6132         vgPlain_assert_fail((Bool )1,
6133                             (Char const   *)"VG_(dyn_vgdb_error) == VG_(clo_vgdb_error)",   6133                             (Char const   *)"VG_(dyn_vgdb_error) == VG_(clo_vgdb_error)",
6134                             (Char const   *)"m_scheduler/scheduler.c", 1041,   6134                             (Char const   *)"m_scheduler/scheduler.c", 1041,
6135                             (Char const   *)"vgPlain_scheduler", "");   6135                             (Char const   *)"vgPlain_scheduler", "");
6136       }   6136       }
6137       vgPlain_gdbserver_prerun_action((ThreadId )1);   6137       vgPlain_gdbserver_prerun_action((ThreadId )1);
6138     } else {   6138     } else {
6139       vgPlain_disable_vgdb_poll();   6139       vgPlain_disable_vgdb_poll();
6140     }   6140     }
6141   } else {   6141   } else {
6142     6142  
6143   }   6143   }
6144   block_signals();   6144   block_signals();
6145   tmp___2 = vgPlain_is_running_thread(tid);   6145   tmp___2 = vgPlain_is_running_thread(tid);
6146   if (tmp___2) {   6146   if (tmp___2) {
6147     tmp___3 = 1;   6147     tmp___3 = 1;
6148   } else {   6148   } else {
6149     tmp___3 = 0;   6149     tmp___3 = 0;
6150   }   6150   }
6151   tmp___4 = __builtin_expect((long )tmp___3, 1L);   6151   tmp___4 = __builtin_expect((long )tmp___3, 1L);
6152   if (tmp___4) {   6152   if (tmp___4) {
6153     6153  
6154   } else {   6154   } else {
6155     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(tid)",   6155     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(tid)",
6156                         (Char const   *)"m_scheduler/scheduler.c", 1054,   6156                         (Char const   *)"m_scheduler/scheduler.c", 1054,
6157                         (Char const   *)"vgPlain_scheduler", "");   6157                         (Char const   *)"vgPlain_scheduler", "");
6158   }   6158   }
6159   vgPlain_dispatch_ctr = (UInt )100001;   6159   vgPlain_dispatch_ctr = (UInt )100001;
6160   while (1) {   6160   while (1) {
6161     tmp___22 = vgPlain_is_exiting(tid);   6161     tmp___22 = vgPlain_is_exiting(tid);
6162     if (tmp___22) {   6162     if (tmp___22) {
6163       break;   6163       break;
6164     } else {   6164     } else {
6165     6165  
6166     }   6166     }
6167     if (vgPlain_dispatch_ctr == 1U) {   6167     if (vgPlain_dispatch_ctr == 1U) {
6168       vgPlain_release_BigLock(tid, (ThreadStatus )4,   6168       vgPlain_release_BigLock(tid, (ThreadStatus )4,
6169                               (HChar *)"VG_(scheduler):timeslice");   6169                               (HChar *)"VG_(scheduler):timeslice");
6170       vgPlain_acquire_BigLock(tid, (HChar *)"VG_(scheduler):timeslice");   6170       vgPlain_acquire_BigLock(tid, (HChar *)"VG_(scheduler):timeslice");
6171       scheduler_sanity(tid);   6171       scheduler_sanity(tid);
6172       vgPlain_sanity_check_general((Bool )0);   6172       vgPlain_sanity_check_general((Bool )0);
6173       vgPlain_poll_signals(tid);   6173       vgPlain_poll_signals(tid);
6174       tmp___5 = vgPlain_is_exiting(tid);   6174       tmp___5 = vgPlain_is_exiting(tid);
6175       if (tmp___5) {   6175       if (tmp___5) {
6176         break;   6176         break;
6177       } else {   6177       } else {
6178     6178  
6179       }   6179       }
6180       n_scheduling_events_MAJOR ++;   6180       n_scheduling_events_MAJOR ++;
6181       vgPlain_dispatch_ctr = (UInt )100001;   6181       vgPlain_dispatch_ctr = (UInt )100001;
6182       tmp___6 = __builtin_expect((long )(! (! (tst->tid == tid))), 1L);   6182       tmp___6 = __builtin_expect((long )(! (! (tst->tid == tid))), 1L);
6183       if (tmp___6) {   6183       if (tmp___6) {
6184     6184  
6185       } else {   6185       } else {
6186         vgPlain_assert_fail((Bool )1, (Char const   *)"tst->tid == tid",   6186         vgPlain_assert_fail((Bool )1, (Char const   *)"tst->tid == tid",
6187                             (Char const   *)"m_scheduler/scheduler.c", 1132,   6187                             (Char const   *)"m_scheduler/scheduler.c", 1132,
6188                             (Char const   *)"vgPlain_scheduler", "");   6188                             (Char const   *)"vgPlain_scheduler", "");
6189       }   6189       }
6190       tmp___7 = vgPlain_gettid();   6190       tmp___7 = vgPlain_gettid();
6191       if (tst->os_state.lwpid == tmp___7) {   6191       if (tst->os_state.lwpid == tmp___7) {
6192         tmp___8 = 1;   6192         tmp___8 = 1;
6193       } else {   6193       } else {
6194         tmp___8 = 0;   6194         tmp___8 = 0;
6195       }   6195       }
6196       tmp___9 = __builtin_expect((long )tmp___8, 1L);   6196       tmp___9 = __builtin_expect((long )tmp___8, 1L);
6197       if (tmp___9) {   6197       if (tmp___9) {
6198     6198  
6199       } else {   6199       } else {
6200         vgPlain_assert_fail((Bool )1,   6200         vgPlain_assert_fail((Bool )1,
6201                             (Char const   *)"tst->os_state.lwpid == VG_(gettid)()",   6201                             (Char const   *)"tst->os_state.lwpid == VG_(gettid)()",
6202                             (Char const   *)"m_scheduler/scheduler.c", 1133,   6202                             (Char const   *)"m_scheduler/scheduler.c", 1133,
6203                             (Char const   *)"vgPlain_scheduler", "");   6203                             (Char const   *)"vgPlain_scheduler", "");
6204       }   6204       }
6205     } else {   6205     } else {
6206     6206  
6207     }   6207     }
6208     n_scheduling_events_MINOR ++;   6208     n_scheduling_events_MINOR ++;
6209     trc = run_thread_for_a_while(tid);   6209     trc = run_thread_for_a_while(tid);
6210     if (vgPlain_clo_trace_sched) {   6210     if (vgPlain_clo_trace_sched) {
6211       if (vgPlain_clo_verbosity > 2) {   6211       if (vgPlain_clo_verbosity > 2) {
6212         tmp___10 = name_of_sched_event(trc);   6212         tmp___10 = name_of_sched_event(trc);
6213         vgPlain_sprintf(buf, "TRC: %s", tmp___10);   6213         vgPlain_sprintf(buf, "TRC: %s", tmp___10);
6214         print_sched_event(tid, buf);   6214         print_sched_event(tid, buf);
6215       } else {   6215       } else {
6216     6216  
6217       }   6217       }
6218     } else {   6218     } else {
6219     6219  
6220     }   6220     }
6221     if (trc == 81U) {   6221     if (trc == 81U) {
6222       trc = handle_noredir_jump(tid);   6222       trc = handle_noredir_jump(tid);
6223       tmp___11 = __builtin_expect((long )(! (! (trc != 81U))), 1L);   6223       tmp___11 = __builtin_expect((long )(! (! (trc != 81U))), 1L);
6224       if (tmp___11) {   6224       if (tmp___11) {
6225     6225  
6226       } else {   6226       } else {
6227         vgPlain_assert_fail((Bool )1,   6227         vgPlain_assert_fail((Bool )1,
6228                             (Char const   *)"trc != VEX_TRC_JMP_NOREDIR",   6228                             (Char const   *)"trc != VEX_TRC_JMP_NOREDIR",
6229                             (Char const   *)"m_scheduler/scheduler.c", 1160,   6229                             (Char const   *)"m_scheduler/scheduler.c", 1160,
6230                             (Char const   *)"vgPlain_scheduler", "");   6230                             (Char const   *)"vgPlain_scheduler", "");
6231       }   6231       }
6232     } else {   6232     } else {
6233     6233  
6234     }   6234     }
6235     switch (trc) {   6235     switch (trc) {
6236     case 29U:   6236     case 29U:
6237     break;   6237     break;
6238     case 37U:   6238     case 37U:
6239     tmp___12 = __builtin_expect((long )(! (! (vgPlain_dispatch_ctr > 1U))), 1L);   6239     tmp___12 = __builtin_expect((long )(! (! (vgPlain_dispatch_ctr > 1U))), 1L);
6240     if (tmp___12) {   6240     if (tmp___12) {
6241     6241  
6242     } else {   6242     } else {
6243       vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(dispatch_ctr) > 1",   6243       vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(dispatch_ctr) > 1",
6244                           (Char const   *)"m_scheduler/scheduler.c", 1169,   6244                           (Char const   *)"m_scheduler/scheduler.c", 1169,
6245                           (Char const   *)"vgPlain_scheduler", "");   6245                           (Char const   *)"vgPlain_scheduler", "");
6246     }   6246     }
6247     handle_tt_miss(tid);   6247     handle_tt_miss(tid);
6248     break;   6248     break;
6249     case 65U:   6249     case 65U:
6250     do_client_request(tid);   6250     do_client_request(tid);
6251     break;   6251     break;
6252     case 73U:   6252     case 73U:
6253     case 91U:   6253     case 91U:
6254     case 89U:   6254     case 89U:
6255     case 77U:   6255     case 77U:
6256     handle_syscall(tid, trc);   6256     handle_syscall(tid, trc);
6257     if (vgPlain_clo_sanity_level > 2) {   6257     if (vgPlain_clo_sanity_level > 2) {
6258       vgPlain_sanity_check_general((Bool )1);   6258       vgPlain_sanity_check_general((Bool )1);
6259     } else {   6259     } else {
6260     6260  
6261     }   6261     }
6262     break;   6262     break;
6263     case 67U:   6263     case 67U:
6264     if (vgPlain_dispatch_ctr > 2000U) {   6264     if (vgPlain_dispatch_ctr > 2000U) {
6265       vgPlain_dispatch_ctr = (UInt )2000;   6265       vgPlain_dispatch_ctr = (UInt )2000;
6266     } else {   6266     } else {
6267     6267  
6268     }   6268     }
6269     break;   6269     break;
6270     case 41U:   6270     case 41U:
6271     tmp___13 = __builtin_expect((long )(! (! (vgPlain_dispatch_ctr == 1U))), 1L);   6271     tmp___13 = __builtin_expect((long )(! (! (vgPlain_dispatch_ctr == 1U))), 1L);
6272     if (tmp___13) {   6272     if (tmp___13) {
6273     6273  
6274     } else {   6274     } else {
6275       vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(dispatch_ctr) == 1",   6275       vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(dispatch_ctr) == 1",
6276                           (Char const   *)"m_scheduler/scheduler.c", 1200,   6276                           (Char const   *)"m_scheduler/scheduler.c", 1200,
6277                           (Char const   *)"vgPlain_scheduler", "");   6277                           (Char const   *)"vgPlain_scheduler", "");
6278     }   6278     }
6279     break;   6279     break;
6280     case 43U:   6280     case 43U:
6281     break;   6281     break;
6282     case 71U:   6282     case 71U:
6283     vgPlain_synth_fault(tid);   6283     vgPlain_synth_fault(tid);
6284     break;   6284     break;
6285     case 63U:   6285     case 63U:
6286     if (! counts_initted) {   6286     if (! counts_initted) {
6287       counts_initted = (Bool )1;   6287       counts_initted = (Bool )1;
6288       q = 0;   6288       q = 0;
6289       while (q < 10) {   6289       while (q < 10) {
6290         counts[q] = 0;   6290         counts[q] = 0;
6291         q ++;   6291         q ++;
6292       }   6292       }
6293     } else {   6293     } else {
6294     6294  
6295     }   6295     }
6296     ew = (VexEmWarn )vgPlain_threads[tid].arch.vex.guest_EMWARN;   6296     ew = (VexEmWarn )vgPlain_threads[tid].arch.vex.guest_EMWARN;
6297     if ((unsigned int )ew < 0U) {   6297     if ((unsigned int )ew < 0U) {
6298       what = (HChar *)"unknown (?!)";   6298       what = (HChar *)"unknown (?!)";
6299     } else   6299     } else
6300     if ((unsigned int )ew >= 10U) {   6300     if ((unsigned int )ew >= 10U) {
6301       what = (HChar *)"unknown (?!)";   6301       what = (HChar *)"unknown (?!)";
6302     } else {   6302     } else {
6303       tmp___14 = LibVEX_EmWarn_string(ew);   6303       tmp___14 = LibVEX_EmWarn_string(ew);
6304       what = tmp___14;   6304       what = tmp___14;
6305     }   6305     }
6306     if ((unsigned int )ew < 0U) {   6306     if ((unsigned int )ew < 0U) {
6307       show = (Bool )1;   6307       show = (Bool )1;
6308     } else   6308     } else
6309     if ((unsigned int )ew >= 10U) {   6309     if ((unsigned int )ew >= 10U) {
6310       show = (Bool )1;   6310       show = (Bool )1;
6311     } else {   6311     } else {
6312       tmp___15 = counts[ew];   6312       tmp___15 = counts[ew];
6313       (counts[ew]) ++;   6313       (counts[ew]) ++;
6314       show = (Bool )(tmp___15 < 3);   6314       show = (Bool )(tmp___15 < 3);
6315     }   6315     }
6316     if (show) {   6316     if (show) {
6317       if (vgPlain_clo_show_emwarns) {   6317       if (vgPlain_clo_show_emwarns) {
6318         if (! vgPlain_clo_xml) {   6318         if (! vgPlain_clo_xml) {
6319           vgPlain_message((VgMsgKind )1,   6319           vgPlain_message((VgMsgKind )1,
6320                           "Emulation warning: unsupported action:\n");   6320                           "Emulation warning: unsupported action:\n");
6321           vgPlain_message((VgMsgKind )1, "  %s\n", what);   6321           vgPlain_message((VgMsgKind )1, "  %s\n", what);
6322           vgPlain_get_and_pp_StackTrace(tid, (UInt )vgPlain_clo_backtrace_size);   6322           vgPlain_get_and_pp_StackTrace(tid, (UInt )vgPlain_clo_backtrace_size);
6323         } else {   6323         } else {
6324     6324  
6325         }   6325         }
6326       } else {   6326       } else {
6327     6327  
6328       }   6328       }
6329     } else {   6329     } else {
6330     6330  
6331     }   6331     }
6332     break;   6332     break;
6333     case 83U:   6333     case 83U:
6334     ew___0 = (VexEmWarn )vgPlain_threads[tid].arch.vex.guest_EMWARN;   6334     ew___0 = (VexEmWarn )vgPlain_threads[tid].arch.vex.guest_EMWARN;
6335     if ((unsigned int )ew___0 < 0U) {   6335     if ((unsigned int )ew___0 < 0U) {
6336       what___0 = (HChar *)"unknown (?!)";   6336       what___0 = (HChar *)"unknown (?!)";
6337     } else   6337     } else
6338     if ((unsigned int )ew___0 >= 10U) {   6338     if ((unsigned int )ew___0 >= 10U) {
6339       what___0 = (HChar *)"unknown (?!)";   6339       what___0 = (HChar *)"unknown (?!)";
6340     } else {   6340     } else {
6341       tmp___16 = LibVEX_EmWarn_string(ew___0);   6341       tmp___16 = LibVEX_EmWarn_string(ew___0);
6342       what___0 = tmp___16;   6342       what___0 = tmp___16;
6343     }   6343     }
6344     vgPlain_message((VgMsgKind )1,   6344     vgPlain_message((VgMsgKind )1,
6345                     "Emulation fatal error -- Valgrind cannot continue:\n");   6345                     "Emulation fatal error -- Valgrind cannot continue:\n");
6346     vgPlain_message((VgMsgKind )1, "  %s\n", what___0);   6346     vgPlain_message((VgMsgKind )1, "  %s\n", what___0);
6347     vgPlain_get_and_pp_StackTrace(tid, (UInt )vgPlain_clo_backtrace_size);   6347     vgPlain_get_and_pp_StackTrace(tid, (UInt )vgPlain_clo_backtrace_size);
6348     vgPlain_message((VgMsgKind )1, "\n");   6348     vgPlain_message((VgMsgKind )1, "\n");
6349     vgPlain_message((VgMsgKind )1, "Valgrind has to exit now.  Sorry.\n");   6349     vgPlain_message((VgMsgKind )1, "Valgrind has to exit now.  Sorry.\n");
6350     vgPlain_message((VgMsgKind )1, "\n");   6350     vgPlain_message((VgMsgKind )1, "\n");
6351     vgPlain_exit(1);   6351     vgPlain_exit(1);
6352     break;   6352     break;
6353     case 85U:   6353     case 85U:
6354     vgPlain_synth_sigtrap(tid);   6354     vgPlain_synth_sigtrap(tid);
6355     break;   6355     break;
6356     case 87U:   6356     case 87U:
6357     vgPlain_synth_fault(tid);   6357     vgPlain_synth_fault(tid);
6358     break;   6358     break;
6359     case 93U:   6359     case 93U:
6360     vgPlain_synth_sigbus(tid);   6360     vgPlain_synth_sigbus(tid);
6361     break;   6361     break;
6362     case 69U:   6362     case 69U:
6363     tmp___17 = vgPlain_get_IP(tid);   6363     tmp___17 = vgPlain_get_IP(tid);
6364     vgPlain_umsg("valgrind: Unrecognised instruction at address %#lx.\n",   6364     vgPlain_umsg("valgrind: Unrecognised instruction at address %#lx.\n",
6365                  tmp___17);   6365                  tmp___17);
6366     vgPlain_get_and_pp_StackTrace(tid, (UInt )50);   6366     vgPlain_get_and_pp_StackTrace(tid, (UInt )50);
6367     vgPlain_umsg("Your program just tried to execute an instruction that Valgrind\n");   6367     vgPlain_umsg("Your program just tried to execute an instruction that Valgrind\n");
6368     vgPlain_umsg("did not recognise.  There are two possible reasons for this.\n");   6368     vgPlain_umsg("did not recognise.  There are two possible reasons for this.\n");
6369     vgPlain_umsg("1. Your program has a bug and erroneously jumped to a non-code\n");   6369     vgPlain_umsg("1. Your program has a bug and erroneously jumped to a non-code\n");
6370     vgPlain_umsg("   location.  If you are running Memcheck and you just saw a\n");   6370     vgPlain_umsg("   location.  If you are running Memcheck and you just saw a\n");
6371     vgPlain_umsg("   warning about a bad jump, it\'s probably your program\'s fault.\n");   6371     vgPlain_umsg("   warning about a bad jump, it\'s probably your program\'s fault.\n");
6372     vgPlain_umsg("2. The instruction is legitimate but Valgrind doesn\'t handle it,\n");   6372     vgPlain_umsg("2. The instruction is legitimate but Valgrind doesn\'t handle it,\n");
6373     vgPlain_umsg("   i.e. it\'s Valgrind\'s fault.  If you think this is the case or\n");   6373     vgPlain_umsg("   i.e. it\'s Valgrind\'s fault.  If you think this is the case or\n");
6374     vgPlain_umsg("   you are not sure, please let us know and we\'ll try to fix it.\n");   6374     vgPlain_umsg("   you are not sure, please let us know and we\'ll try to fix it.\n");
6375     vgPlain_umsg("Either way, Valgrind will now raise a SIGILL signal which will\n");   6375     vgPlain_umsg("Either way, Valgrind will now raise a SIGILL signal which will\n");
6376     vgPlain_umsg("probably kill your program.\n");   6376     vgPlain_umsg("probably kill your program.\n");
6377     tmp___18 = vgPlain_get_IP(tid);   6377     tmp___18 = vgPlain_get_IP(tid);
6378     vgPlain_synth_sigill(tid, tmp___18);   6378     vgPlain_synth_sigill(tid, tmp___18);
6379     break;   6379     break;
6380     case 61U:   6380     case 61U:
6381     vgPlain_discard_translations((Addr64 )vgPlain_threads[tid].arch.vex.guest_TISTART,   6381     vgPlain_discard_translations((Addr64 )vgPlain_threads[tid].arch.vex.guest_TISTART,
6382                                  (ULong )vgPlain_threads[tid].arch.vex.guest_TILEN,   6382                                  (ULong )vgPlain_threads[tid].arch.vex.guest_TILEN,
6383                                  (HChar *)"scheduler(VEX_TRC_JMP_TINVAL)");   6383                                  (HChar *)"scheduler(VEX_TRC_JMP_TINVAL)");
6384     break;   6384     break;
6385     case 47U:   6385     case 47U:
6386     tmp___19 = __builtin_expect(0L, 1L);   6386     tmp___19 = __builtin_expect(0L, 1L);
6387     if (tmp___19) {   6387     if (tmp___19) {
6388     6388  
6389     } else {   6389     } else {
6390       vgPlain_assert_fail((Bool )1, (Char const   *)"0",   6390       vgPlain_assert_fail((Bool )1, (Char const   *)"0",
6391                           (Char const   *)"m_scheduler/scheduler.c", 1319,   6391                           (Char const   *)"m_scheduler/scheduler.c", 1319,
6392                           (Char const   *)"vgPlain_scheduler",   6392                           (Char const   *)"vgPlain_scheduler",
6393                           "VG_(scheduler), phase 3: run_innerloop detected host state invariant failure",   6393                           "VG_(scheduler), phase 3: run_innerloop detected host state invariant failure",
6394                           trc);   6394                           trc);
6395     }   6395     }
6396     case 79U:   6396     case 79U:
6397     tmp___20 = __builtin_expect(0L, 1L);   6397     tmp___20 = __builtin_expect(0L, 1L);
6398     if (tmp___20) {   6398     if (tmp___20) {
6399     6399  
6400     } else {   6400     } else {
6401       vgPlain_assert_fail((Bool )1, (Char const   *)"0",   6401       vgPlain_assert_fail((Bool )1, (Char const   *)"0",
6402                           (Char const   *)"m_scheduler/scheduler.c", 1331,   6402                           (Char const   *)"m_scheduler/scheduler.c", 1331,
6403                           (Char const   *)"vgPlain_scheduler",   6403                           (Char const   *)"vgPlain_scheduler",
6404                           "VG_(scheduler), phase 3: sysenter_x86 on x86-linux is not supported");   6404                           "VG_(scheduler), phase 3: sysenter_x86 on x86-linux is not supported");
6405     }   6405     }
6406     break;   6406     break;
6407     default:   6407     default:
6408     tmp___21 = __builtin_expect(0L, 1L);   6408     tmp___21 = __builtin_expect(0L, 1L);
6409     if (tmp___21) {   6409     if (tmp___21) {
6410     6410  
6411     } else {   6411     } else {
6412       vgPlain_assert_fail((Bool )1, (Char const   *)"0",   6412       vgPlain_assert_fail((Bool )1, (Char const   *)"0",
6413                           (Char const   *)"m_scheduler/scheduler.c", 1345,   6413                           (Char const   *)"m_scheduler/scheduler.c", 1345,
6414                           (Char const   *)"vgPlain_scheduler",   6414                           (Char const   *)"vgPlain_scheduler",
6415                           "VG_(scheduler), phase 3: unexpected thread return code (%u)",   6415                           "VG_(scheduler), phase 3: unexpected thread return code (%u)",
6416                           trc);   6416                           trc);
6417     }   6417     }
6418     break;   6418     break;
6419     }   6419     }
6420   }   6420   }
6421   if (vgPlain_clo_trace_sched) {   6421   if (vgPlain_clo_trace_sched) {
6422     print_sched_event(tid, (Char *)"exiting VG_(scheduler)");   6422     print_sched_event(tid, (Char *)"exiting VG_(scheduler)");
6423   } else {   6423   } else {
6424     6424  
6425   }   6425   }
6426   tmp___23 = vgPlain_is_exiting(tid);   6426   tmp___23 = vgPlain_is_exiting(tid);
6427   if (tmp___23) {   6427   if (tmp___23) {
6428     tmp___24 = 1;   6428     tmp___24 = 1;
6429   } else {   6429   } else {
6430     tmp___24 = 0;   6430     tmp___24 = 0;
6431   }   6431   }
6432   tmp___25 = __builtin_expect((long )tmp___24, 1L);   6432   tmp___25 = __builtin_expect((long )tmp___24, 1L);
6433   if (tmp___25) {   6433   if (tmp___25) {
6434     6434  
6435   } else {   6435   } else {
6436     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_exiting)(tid)",   6436     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_exiting)(tid)",
6437                         (Char const   *)"m_scheduler/scheduler.c", 1355,   6437                         (Char const   *)"m_scheduler/scheduler.c", 1355,
6438                         (Char const   *)"vgPlain_scheduler", "");   6438                         (Char const   *)"vgPlain_scheduler", "");
6439   }   6439   }
6440   return (tst->exitreason);   6440   return (tst->exitreason);
6441 }   6441 }
6442 }   6442 }
6443 void vgPlain_nuke_all_threads_except(ThreadId me , VgSchedReturnCode src )   6443 void vgPlain_nuke_all_threads_except(ThreadId me , VgSchedReturnCode src )
6444 {   6444 {
6445   ThreadId tid ;   6445   ThreadId tid ;
6446   Bool tmp ;   6446   Bool tmp ;
6447   int tmp___0 ;   6447   int tmp___0 ;
6448   long tmp___1 ;   6448   long tmp___1 ;
6449     6449  
6450   {   6450   {
6451   tmp = vgPlain_is_running_thread(me);   6451   tmp = vgPlain_is_running_thread(me);
6452   if (tmp) {   6452   if (tmp) {
6453     tmp___0 = 1;   6453     tmp___0 = 1;
6454   } else {   6454   } else {
6455     tmp___0 = 0;   6455     tmp___0 = 0;
6456   }   6456   }
6457   tmp___1 = __builtin_expect((long )tmp___0, 1L);   6457   tmp___1 = __builtin_expect((long )tmp___0, 1L);
6458   if (tmp___1) {   6458   if (tmp___1) {
6459     6459  
6460   } else {   6460   } else {
6461     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(me)",   6461     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(me)",
6462                         (Char const   *)"m_scheduler/scheduler.c", 1370,   6462                         (Char const   *)"m_scheduler/scheduler.c", 1370,
6463                         (Char const   *)"vgPlain_nuke_all_threads_except", "");   6463                         (Char const   *)"vgPlain_nuke_all_threads_except", "");
6464   }   6464   }
6465   tid = (ThreadId )1;   6465   tid = (ThreadId )1;
6466   while (tid < 500U) {   6466   while (tid < 500U) {
6467     if (tid == me) {   6467     if (tid == me) {
6468       goto __Cont;   6468       goto __Cont;
6469     } else   6469     } else
6470     if ((unsigned int )vgPlain_threads[tid].status == 0U) {   6470     if ((unsigned int )vgPlain_threads[tid].status == 0U) {
6471       goto __Cont;   6471       goto __Cont;
6472     } else {   6472     } else {
6473     6473  
6474     }   6474     }
6475     vgPlain_threads[tid].exitreason = src;   6475     vgPlain_threads[tid].exitreason = src;
6476     if ((unsigned int )src == 3U) {   6476     if ((unsigned int )src == 3U) {
6477       vgPlain_threads[tid].os_state.fatalsig = 9;   6477       vgPlain_threads[tid].os_state.fatalsig = 9;
6478     } else {   6478     } else {
6479     6479  
6480     }   6480     }
6481     vgPlain_get_thread_out_of_syscall(tid);   6481     vgPlain_get_thread_out_of_syscall(tid);
6482     __Cont: /* CIL Label */   6482     __Cont: /* CIL Label */
6483     tid ++;   6483     tid ++;
6484   }   6484   }
6485   return;   6485   return;
6486 }   6486 }
6487 }   6487 }
6488 static Bool os_client_request(ThreadId tid , UWord *args )   6488 static Bool os_client_request(ThreadId tid , UWord *args )
6489 {   6489 {
6490   Bool handled ;   6490   Bool handled ;
6491   Bool tmp ;   6491   Bool tmp ;
6492   int tmp___0 ;   6492   int tmp___0 ;
6493   long tmp___1 ;   6493   long tmp___1 ;
6494     6494  
6495   {   6495   {
6496   handled = (Bool )1;   6496   handled = (Bool )1;
6497   tmp = vgPlain_is_running_thread(tid);   6497   tmp = vgPlain_is_running_thread(tid);
6498   if (tmp) {   6498   if (tmp) {
6499     tmp___0 = 1;   6499     tmp___0 = 1;
6500   } else {   6500   } else {
6501     tmp___0 = 0;   6501     tmp___0 = 0;
6502   }   6502   }
6503   tmp___1 = __builtin_expect((long )tmp___0, 1L);   6503   tmp___1 = __builtin_expect((long )tmp___0, 1L);
6504   if (tmp___1) {   6504   if (tmp___1) {
6505     6505  
6506   } else {   6506   } else {
6507     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(tid)",   6507     vgPlain_assert_fail((Bool )1, (Char const   *)"VG_(is_running_thread)(tid)",
6508                         (Char const   *)"m_scheduler/scheduler.c", 1440,   6508                         (Char const   *)"m_scheduler/scheduler.c", 1440,
6509                         (Char const   *)"os_client_request", "");   6509                         (Char const   *)"os_client_request", "");
6510   }   6510   }
6511   switch (*(args + 0)) {   6511   switch (*(args + 0)) {
6512   case 12329UL:   6512   case 12329UL:
6513   if (vgPlain_clo_trace_syscalls) {   6513   if (vgPlain_clo_trace_syscalls) {
6514     vgPlain_message((VgMsgKind )2, "__libc_freeres() done; really quitting!\n");   6514     vgPlain_message((VgMsgKind )2, "__libc_freeres() done; really quitting!\n");
6515   } else   6515   } else
6516   if (vgPlain_clo_trace_sched) {   6516   if (vgPlain_clo_trace_sched) {
6517     vgPlain_message((VgMsgKind )2, "__libc_freeres() done; really quitting!\n");   6517     vgPlain_message((VgMsgKind )2, "__libc_freeres() done; really quitting!\n");
6518   } else {   6518   } else {
6519     6519  
6520   }   6520   }
6521   vgPlain_threads[tid].exitreason = (VgSchedReturnCode )1;   6521   vgPlain_threads[tid].exitreason = (VgSchedReturnCode )1;
6522   break;   6522   break;
6523   default:   6523   default:
6524   handled = (Bool )0;   6524   handled = (Bool )0;
6525   break;   6525   break;
6526   }   6526   }
6527   return (handled);   6527   return (handled);
6528 }   6528 }
6529 }   6529 }
6530 static void do_client_request(ThreadId tid ) ;   6530 static void do_client_request(ThreadId tid ) ;
6531 static Bool whined  =    (Bool )0;   6531 static Bool whined  =    (Bool )0;
6532 static void do_client_request(ThreadId tid )   6532 static void do_client_request(ThreadId tid )
6533 {   6533 {
6534   UWord *arg ;   6534   UWord *arg ;
6535   UWord req_no ;   6535   UWord req_no ;
6536   UWord (*f)(ThreadId  ) ;   6536   UWord (*f)(ThreadId  ) ;
6537   UWord tmp ;   6537   UWord tmp ;
6538   UWord (*f___0)(ThreadId  , UWord  ) ;   6538   UWord (*f___0)(ThreadId  , UWord  ) ;
6539   UWord tmp___0 ;   6539   UWord tmp___0 ;
6540   UWord (*f___1)(ThreadId  , UWord  , UWord  ) ;   6540   UWord (*f___1)(ThreadId  , UWord  , UWord  ) ;
6541   UWord tmp___1 ;   6541   UWord tmp___1 ;
6542   UWord (*f___2)(ThreadId  , UWord  , UWord  , UWord  ) ;   6542   UWord (*f___2)(ThreadId  , UWord  , UWord  , UWord  ) ;
6543   UWord tmp___2 ;   6543   UWord tmp___2 ;
6544   unsigned int volatile   _zzq_args[6] ;   6544   unsigned int volatile   _zzq_args[6] ;
6545   unsigned int volatile   _zzq_result ;   6545   unsigned int volatile   _zzq_result ;
6546   union __anonunion_u_135 u ;   6546   union __anonunion_u_135 u ;
6547   Int count ;   6547   Int count ;
6548   UInt tmp___3 ;   6548   UInt tmp___3 ;
6549   union __anonunion_u_136 u___0 ;   6549   union __anonunion_u_136 u___0 ;
6550   Int count___0 ;   6550   Int count___0 ;
6551   UInt tmp___4 ;   6551   UInt tmp___4 ;
6552   va_list *vargsp ;   6552   va_list *vargsp ;
6553   Int count___1 ;   6553   Int count___1 ;
6554   UInt tmp___5 ;   6554   UInt tmp___5 ;
6555   va_list *vargsp___0 ;   6555   va_list *vargsp___0 ;
6556   Int count___2 ;   6556   Int count___2 ;
6557   UInt tmp___6 ;   6557   UInt tmp___6 ;
6558   va_list *vargsp___1 ;   6558   va_list *vargsp___1 ;
6559   Int count___3 ;   6559   Int count___3 ;
6560   UInt tmp___7 ;   6560   UInt tmp___7 ;
6561   UWord sid ;   6561   UWord sid ;
6562   UWord tmp___8 ;   6562   UWord tmp___8 ;
6563   struct vg_mallocfunc_info *info ;   6563   struct vg_mallocfunc_info *info ;
6564   Addr ip ;   6564   Addr ip ;
6565   UChar *buf64 ;   6565   UChar *buf64 ;
6566   UInt linenum ;   6566   UInt linenum ;
6567   Bool ok ;   6567   Bool ok ;
6568   Bool tmp___9 ;   6568   Bool tmp___9 ;
6569   UInt i ;   6569   UInt i ;
6570   long tmp___10 ;   6570   long tmp___10 ;
6571   UWord ret ;   6571   UWord ret ;
6572   long tmp___11 ;   6572   long tmp___11 ;
6573   Bool tmp___12 ;   6573   Bool tmp___12 ;
6574   Char c1 ;   6574   Char c1 ;
6575   Char c2 ;   6575   Char c2 ;
6576   Bool tmp___13 ;   6576   Bool tmp___13 ;
6577   long tmp___14 ;   6577   long tmp___14 ;
6578     6578  
6579   {   6579   {
6580   arg = (UWord *)vgPlain_threads[tid].arch.vex.guest_EAX;   6580   arg = (UWord *)vgPlain_threads[tid].arch.vex.guest_EAX;
6581   req_no = *(arg + 0);   6581   req_no = *(arg + 0);
6582   switch (req_no) {   6582   switch (req_no) {
6583   case 4353UL:   6583   case 4353UL:
6584   f = (UWord (*)(ThreadId  ))((void *)*(arg + 1));   6584   f = (UWord (*)(ThreadId  ))((void *)*(arg + 1));
6585   if ((unsigned int )f == (unsigned int )((void *)0)) {   6585   if ((unsigned int )f == (unsigned int )((void *)0)) {
6586     vgPlain_message((VgMsgKind )2, "VG_USERREQ__CLIENT_CALL0: func=%p\n", f);   6586     vgPlain_message((VgMsgKind )2, "VG_USERREQ__CLIENT_CALL0: func=%p\n", f);
6587   } else {   6587   } else {
6588     while (1) {   6588     while (1) {
6589       tmp = (*f)(tid);   6589       tmp = (*f)(tid);
6590       vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )tmp;   6590       vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )tmp;
6591       while (1) {   6591       while (1) {
6592         if (vgPlain_tdict.track_post_reg_write_clientcall_return) {   6592         if (vgPlain_tdict.track_post_reg_write_clientcall_return) {
6593           (*(vgPlain_tdict.track_post_reg_write_clientcall_return))(tid,   6593           (*(vgPlain_tdict.track_post_reg_write_clientcall_return))(tid,
6594                                                                     (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6594                                                                     (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6595                                                                     (SizeT )sizeof(UWord ),   6595                                                                     (SizeT )sizeof(UWord ),
6596                                                                     (Addr )f);   6596                                                                     (Addr )f);
6597         } else {   6597         } else {
6598     6598  
6599         }   6599         }
6600         break;   6600         break;
6601       }   6601       }
6602       break;   6602       break;
6603     }   6603     }
6604   }   6604   }
6605   break;   6605   break;
6606   case 4354UL:   6606   case 4354UL:
6607   f___0 = (UWord (*)(ThreadId  , UWord  ))((void *)*(arg + 1));   6607   f___0 = (UWord (*)(ThreadId  , UWord  ))((void *)*(arg + 1));
6608   if ((unsigned int )f___0 == (unsigned int )((void *)0)) {   6608   if ((unsigned int )f___0 == (unsigned int )((void *)0)) {
6609     vgPlain_message((VgMsgKind )2, "VG_USERREQ__CLIENT_CALL1: func=%p\n", f___0);   6609     vgPlain_message((VgMsgKind )2, "VG_USERREQ__CLIENT_CALL1: func=%p\n", f___0);
6610   } else {   6610   } else {
6611     while (1) {   6611     while (1) {
6612       tmp___0 = (*f___0)(tid, *(arg + 2));   6612       tmp___0 = (*f___0)(tid, *(arg + 2));
6613       vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )tmp___0;   6613       vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )tmp___0;
6614       while (1) {   6614       while (1) {
6615         if (vgPlain_tdict.track_post_reg_write_clientcall_return) {   6615         if (vgPlain_tdict.track_post_reg_write_clientcall_return) {
6616           (*(vgPlain_tdict.track_post_reg_write_clientcall_return))(tid,   6616           (*(vgPlain_tdict.track_post_reg_write_clientcall_return))(tid,
6617                                                                     (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6617                                                                     (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6618                                                                     (SizeT )sizeof(UWord ),   6618                                                                     (SizeT )sizeof(UWord ),
6619                                                                     (Addr )f___0);   6619                                                                     (Addr )f___0);
6620         } else {   6620         } else {
6621     6621  
6622         }   6622         }
6623         break;   6623         break;
6624       }   6624       }
6625       break;   6625       break;
6626     }   6626     }
6627   }   6627   }
6628   break;   6628   break;
6629   case 4355UL:   6629   case 4355UL:
6630   f___1 = (UWord (*)(ThreadId  , UWord  , UWord  ))((void *)*(arg + 1));   6630   f___1 = (UWord (*)(ThreadId  , UWord  , UWord  ))((void *)*(arg + 1));
6631   if ((unsigned int )f___1 == (unsigned int )((void *)0)) {   6631   if ((unsigned int )f___1 == (unsigned int )((void *)0)) {
6632     vgPlain_message((VgMsgKind )2, "VG_USERREQ__CLIENT_CALL2: func=%p\n", f___1);   6632     vgPlain_message((VgMsgKind )2, "VG_USERREQ__CLIENT_CALL2: func=%p\n", f___1);
6633   } else {   6633   } else {
6634     while (1) {   6634     while (1) {
6635       tmp___1 = (*f___1)(tid, *(arg + 2), *(arg + 3));   6635       tmp___1 = (*f___1)(tid, *(arg + 2), *(arg + 3));
6636       vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )tmp___1;   6636       vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )tmp___1;
6637       while (1) {   6637       while (1) {
6638         if (vgPlain_tdict.track_post_reg_write_clientcall_return) {   6638         if (vgPlain_tdict.track_post_reg_write_clientcall_return) {
6639           (*(vgPlain_tdict.track_post_reg_write_clientcall_return))(tid,   6639           (*(vgPlain_tdict.track_post_reg_write_clientcall_return))(tid,
6640                                                                     (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6640                                                                     (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6641                                                                     (SizeT )sizeof(UWord ),   6641                                                                     (SizeT )sizeof(UWord ),
6642                                                                     (Addr )f___1);   6642                                                                     (Addr )f___1);
6643         } else {   6643         } else {
6644     6644  
6645         }   6645         }
6646         break;   6646         break;
6647       }   6647       }
6648       break;   6648       break;
6649     }   6649     }
6650   }   6650   }
6651   break;   6651   break;
6652   case 4356UL:   6652   case 4356UL:
6653   f___2 = (UWord (*)(ThreadId  , UWord  , UWord  , UWord  ))((void *)*(arg + 1));   6653   f___2 = (UWord (*)(ThreadId  , UWord  , UWord  , UWord  ))((void *)*(arg + 1));
6654   if ((unsigned int )f___2 == (unsigned int )((void *)0)) {   6654   if ((unsigned int )f___2 == (unsigned int )((void *)0)) {
6655     vgPlain_message((VgMsgKind )2, "VG_USERREQ__CLIENT_CALL3: func=%p\n", f___2);   6655     vgPlain_message((VgMsgKind )2, "VG_USERREQ__CLIENT_CALL3: func=%p\n", f___2);
6656   } else {   6656   } else {
6657     while (1) {   6657     while (1) {
6658       tmp___2 = (*f___2)(tid, *(arg + 2), *(arg + 3), *(arg + 4));   6658       tmp___2 = (*f___2)(tid, *(arg + 2), *(arg + 3), *(arg + 4));
6659       vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )tmp___2;   6659       vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )tmp___2;
6660       while (1) {   6660       while (1) {
6661         if (vgPlain_tdict.track_post_reg_write_clientcall_return) {   6661         if (vgPlain_tdict.track_post_reg_write_clientcall_return) {
6662           (*(vgPlain_tdict.track_post_reg_write_clientcall_return))(tid,   6662           (*(vgPlain_tdict.track_post_reg_write_clientcall_return))(tid,
6663                                                                     (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6663                                                                     (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6664                                                                     (SizeT )sizeof(UWord ),   6664                                                                     (SizeT )sizeof(UWord ),
6665                                                                     (Addr )f___2);   6665                                                                     (Addr )f___2);
6666         } else {   6666         } else {
6667     6667  
6668         }   6668         }
6669         break;   6669         break;
6670       }   6670       }
6671       break;   6671       break;
6672     }   6672     }
6673   }   6673   }
6674   break;   6674   break;
6675   case 4097UL:   6675   case 4097UL:
6676   while (1) {   6676   while (1) {
6677     _zzq_args[0] = (unsigned int volatile   )4097U;   6677     _zzq_args[0] = (unsigned int volatile   )4097U;
6678     _zzq_args[1] = (unsigned int volatile   )0U;   6678     _zzq_args[1] = (unsigned int volatile   )0U;
6679     _zzq_args[2] = (unsigned int volatile   )0U;   6679     _zzq_args[2] = (unsigned int volatile   )0U;
6680     _zzq_args[3] = (unsigned int volatile   )0U;   6680     _zzq_args[3] = (unsigned int volatile   )0U;
6681     _zzq_args[4] = (unsigned int volatile   )0U;   6681     _zzq_args[4] = (unsigned int volatile   )0U;
6682     _zzq_args[5] = (unsigned int volatile   )0U;   6682     _zzq_args[5] = (unsigned int volatile   )0U;
6683     __asm__  volatile   ("roll $3,  %%edi ; roll $13, %%edi\n\t"   6683     __asm__  volatile   ("roll $3,  %%edi ; roll $13, %%edi\n\t"
6684                          "roll $29, %%edi ; roll $19, %%edi\n\t"   6684                          "roll $29, %%edi ; roll $19, %%edi\n\t"
6685                          "xchgl %%ebx,%%ebx": "=d" (_zzq_result): "a" (& _zzq_args[0]),   6685                          "xchgl %%ebx,%%ebx": "=d" (_zzq_result): "a" (& _zzq_args[0]),
6686                          "0" (0): "cc", "memory");   6686                          "0" (0): "cc", "memory");
6687     vgPlain_threads[tid].arch.vex.guest_EDX = (unsigned int )_zzq_result + 1U;   6687     vgPlain_threads[tid].arch.vex.guest_EDX = (unsigned int )_zzq_result + 1U;
6688     while (1) {   6688     while (1) {
6689       if (vgPlain_tdict.track_post_reg_write) {   6689       if (vgPlain_tdict.track_post_reg_write) {
6690         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6690         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6691                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6691                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6692                                                 (SizeT )sizeof(UWord ));   6692                                                 (SizeT )sizeof(UWord ));
6693       } else {   6693       } else {
6694     6694  
6695       }   6695       }
6696       break;   6696       break;
6697     }   6697     }
6698     break;   6698     break;
6699   }   6699   }
6700   break;   6700   break;
6701   case 5121UL:   6701   case 5121UL:
6702   if (sizeof(va_list ) != sizeof(UWord )) {   6702   if (sizeof(va_list ) != sizeof(UWord )) {
6703     goto va_list_casting_error_NORETURN;   6703     goto va_list_casting_error_NORETURN;
6704   } else {   6704   } else {
6705     6705  
6706   }   6706   }
6707   u.uw = *(arg + 2);   6707   u.uw = *(arg + 2);
6708   tmp___3 = vgPlain_vmessage((VgMsgKind )3,   6708   tmp___3 = vgPlain_vmessage((VgMsgKind )3,
6709                              (HChar const   *)((char *)*(arg + 1)), u.vargs);   6709                              (HChar const   *)((char *)*(arg + 1)), u.vargs);
6710   count = (Int )tmp___3;   6710   count = (Int )tmp___3;
6711   vgPlain_message_flush();   6711   vgPlain_message_flush();
6712   while (1) {   6712   while (1) {
6713     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )count;   6713     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )count;
6714     while (1) {   6714     while (1) {
6715       if (vgPlain_tdict.track_post_reg_write) {   6715       if (vgPlain_tdict.track_post_reg_write) {
6716         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6716         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6717                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6717                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6718                                                 (SizeT )sizeof(UWord ));   6718                                                 (SizeT )sizeof(UWord ));
6719       } else {   6719       } else {
6720     6720  
6721       }   6721       }
6722       break;   6722       break;
6723     }   6723     }
6724     break;   6724     break;
6725   }   6725   }
6726   break;   6726   break;
6727   case 5122UL:   6727   case 5122UL:
6728   if (sizeof(va_list ) != sizeof(UWord )) {   6728   if (sizeof(va_list ) != sizeof(UWord )) {
6729     goto va_list_casting_error_NORETURN;   6729     goto va_list_casting_error_NORETURN;
6730   } else {   6730   } else {
6731     6731  
6732   }   6732   }
6733   u___0.uw = *(arg + 2);   6733   u___0.uw = *(arg + 2);
6734   tmp___4 = vgPlain_vmessage((VgMsgKind )3,   6734   tmp___4 = vgPlain_vmessage((VgMsgKind )3,
6735                              (HChar const   *)((char *)*(arg + 1)), u___0.vargs);   6735                              (HChar const   *)((char *)*(arg + 1)), u___0.vargs);
6736   count___0 = (Int )tmp___4;   6736   count___0 = (Int )tmp___4;
6737   vgPlain_message_flush();   6737   vgPlain_message_flush();
6738   vgPlain_get_and_pp_StackTrace(tid, (UInt )vgPlain_clo_backtrace_size);   6738   vgPlain_get_and_pp_StackTrace(tid, (UInt )vgPlain_clo_backtrace_size);
6739   while (1) {   6739   while (1) {
6740     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )count___0;   6740     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )count___0;
6741     while (1) {   6741     while (1) {
6742       if (vgPlain_tdict.track_post_reg_write) {   6742       if (vgPlain_tdict.track_post_reg_write) {
6743         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6743         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6744                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6744                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6745                                                 (SizeT )sizeof(UWord ));   6745                                                 (SizeT )sizeof(UWord ));
6746       } else {   6746       } else {
6747     6747  
6748       }   6748       }
6749       break;   6749       break;
6750     }   6750     }
6751     break;   6751     break;
6752   }   6752   }
6753   break;   6753   break;
6754   case 5123UL:   6754   case 5123UL:
6755   vargsp = (va_list *)*(arg + 2);   6755   vargsp = (va_list *)*(arg + 2);
6756   tmp___5 = vgPlain_vmessage((VgMsgKind )3,   6756   tmp___5 = vgPlain_vmessage((VgMsgKind )3,
6757                              (HChar const   *)((char *)*(arg + 1)), *vargsp);   6757                              (HChar const   *)((char *)*(arg + 1)), *vargsp);
6758   count___1 = (Int )tmp___5;   6758   count___1 = (Int )tmp___5;
6759   vgPlain_message_flush();   6759   vgPlain_message_flush();
6760   while (1) {   6760   while (1) {
6761     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )count___1;   6761     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )count___1;
6762     while (1) {   6762     while (1) {
6763       if (vgPlain_tdict.track_post_reg_write) {   6763       if (vgPlain_tdict.track_post_reg_write) {
6764         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6764         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6765                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6765                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6766                                                 (SizeT )sizeof(UWord ));   6766                                                 (SizeT )sizeof(UWord ));
6767       } else {   6767       } else {
6768     6768  
6769       }   6769       }
6770       break;   6770       break;
6771     }   6771     }
6772     break;   6772     break;
6773   }   6773   }
6774   break;   6774   break;
6775   case 5124UL:   6775   case 5124UL:
6776   vargsp___0 = (va_list *)*(arg + 2);   6776   vargsp___0 = (va_list *)*(arg + 2);
6777   tmp___6 = vgPlain_vmessage((VgMsgKind )3,   6777   tmp___6 = vgPlain_vmessage((VgMsgKind )3,
6778                              (HChar const   *)((char *)*(arg + 1)), *vargsp___0);   6778                              (HChar const   *)((char *)*(arg + 1)), *vargsp___0);
6779   count___2 = (Int )tmp___6;   6779   count___2 = (Int )tmp___6;
6780   vgPlain_message_flush();   6780   vgPlain_message_flush();
6781   vgPlain_get_and_pp_StackTrace(tid, (UInt )vgPlain_clo_backtrace_size);   6781   vgPlain_get_and_pp_StackTrace(tid, (UInt )vgPlain_clo_backtrace_size);
6782   while (1) {   6782   while (1) {
6783     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )count___2;   6783     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )count___2;
6784     while (1) {   6784     while (1) {
6785       if (vgPlain_tdict.track_post_reg_write) {   6785       if (vgPlain_tdict.track_post_reg_write) {
6786         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6786         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6787                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6787                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6788                                                 (SizeT )sizeof(UWord ));   6788                                                 (SizeT )sizeof(UWord ));
6789       } else {   6789       } else {
6790     6790  
6791       }   6791       }
6792       break;   6792       break;
6793     }   6793     }
6794     break;   6794     break;
6795   }   6795   }
6796   break;   6796   break;
6797   case 12547UL:   6797   case 12547UL:
6798   vargsp___1 = (va_list *)*(arg + 2);   6798   vargsp___1 = (va_list *)*(arg + 2);
6799   tmp___7 = vgPlain_vmessage((VgMsgKind )2,   6799   tmp___7 = vgPlain_vmessage((VgMsgKind )2,
6800                              (HChar const   *)((char *)*(arg + 1)), *vargsp___1);   6800                              (HChar const   *)((char *)*(arg + 1)), *vargsp___1);
6801   count___3 = (Int )tmp___7;   6801   count___3 = (Int )tmp___7;
6802   vgPlain_message_flush();   6802   vgPlain_message_flush();
6803   while (1) {   6803   while (1) {
6804     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )count___3;   6804     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )count___3;
6805     while (1) {   6805     while (1) {
6806       if (vgPlain_tdict.track_post_reg_write) {   6806       if (vgPlain_tdict.track_post_reg_write) {
6807         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6807         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6808                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6808                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6809                                                 (SizeT )sizeof(UWord ));   6809                                                 (SizeT )sizeof(UWord ));
6810       } else {   6810       } else {
6811     6811  
6812       }   6812       }
6813       break;   6813       break;
6814     }   6814     }
6815     break;   6815     break;
6816   }   6816   }
6817   break;   6817   break;
6818   case 12548UL:   6818   case 12548UL:
6819   vgPlain_redir_add_ifunc_target(*(arg + 1), *(arg + 2));   6819   vgPlain_redir_add_ifunc_target(*(arg + 1), *(arg + 2));
6820   while (1) {   6820   while (1) {
6821     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;   6821     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;
6822     while (1) {   6822     while (1) {
6823       if (vgPlain_tdict.track_post_reg_write) {   6823       if (vgPlain_tdict.track_post_reg_write) {
6824         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6824         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6825                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6825                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6826                                                 (SizeT )sizeof(UWord ));   6826                                                 (SizeT )sizeof(UWord ));
6827       } else {   6827       } else {
6828     6828  
6829       }   6829       }
6830       break;   6830       break;
6831     }   6831     }
6832     break;   6832     break;
6833   }   6833   }
6834   break;   6834   break;
6835   case 5377UL:   6835   case 5377UL:
6836   tmp___8 = vgPlain_register_stack(*(arg + 1), *(arg + 2));   6836   tmp___8 = vgPlain_register_stack(*(arg + 1), *(arg + 2));
6837   sid = tmp___8;   6837   sid = tmp___8;
6838   while (1) {   6838   while (1) {
6839     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )sid;   6839     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )sid;
6840     while (1) {   6840     while (1) {
6841       if (vgPlain_tdict.track_post_reg_write) {   6841       if (vgPlain_tdict.track_post_reg_write) {
6842         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6842         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6843                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6843                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6844                                                 (SizeT )sizeof(UWord ));   6844                                                 (SizeT )sizeof(UWord ));
6845       } else {   6845       } else {
6846     6846  
6847       }   6847       }
6848       break;   6848       break;
6849     }   6849     }
6850     break;   6850     break;
6851   }   6851   }
6852   break;   6852   break;
6853   case 5378UL:   6853   case 5378UL:
6854   vgPlain_deregister_stack(*(arg + 1));   6854   vgPlain_deregister_stack(*(arg + 1));
6855   while (1) {   6855   while (1) {
6856     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;   6856     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;
6857     while (1) {   6857     while (1) {
6858       if (vgPlain_tdict.track_post_reg_write) {   6858       if (vgPlain_tdict.track_post_reg_write) {
6859         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6859         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6860                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6860                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6861                                                 (SizeT )sizeof(UWord ));   6861                                                 (SizeT )sizeof(UWord ));
6862       } else {   6862       } else {
6863     6863  
6864       }   6864       }
6865       break;   6865       break;
6866     }   6866     }
6867     break;   6867     break;
6868   }   6868   }
6869   break;   6869   break;
6870   case 5379UL:   6870   case 5379UL:
6871   vgPlain_change_stack(*(arg + 1), *(arg + 2), *(arg + 3));   6871   vgPlain_change_stack(*(arg + 1), *(arg + 2), *(arg + 3));
6872   while (1) {   6872   while (1) {
6873     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;   6873     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;
6874     while (1) {   6874     while (1) {
6875       if (vgPlain_tdict.track_post_reg_write) {   6875       if (vgPlain_tdict.track_post_reg_write) {
6876         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6876         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6877                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6877                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6878                                                 (SizeT )sizeof(UWord ));   6878                                                 (SizeT )sizeof(UWord ));
6879       } else {   6879       } else {
6880     6880  
6881       }   6881       }
6882       break;   6882       break;
6883     }   6883     }
6884     break;   6884     break;
6885   }   6885   }
6886   break;   6886   break;
6887   case 12336UL:   6887   case 12336UL:
6888   info = (struct vg_mallocfunc_info *)*(arg + 1);   6888   info = (struct vg_mallocfunc_info *)*(arg + 1);
6889   info->tl_malloc = vgPlain_tdict.tool_malloc;   6889   info->tl_malloc = vgPlain_tdict.tool_malloc;
6890   info->tl_calloc = vgPlain_tdict.tool_calloc;   6890   info->tl_calloc = vgPlain_tdict.tool_calloc;
6891   info->tl_realloc = vgPlain_tdict.tool_realloc;   6891   info->tl_realloc = vgPlain_tdict.tool_realloc;
6892   info->tl_memalign = vgPlain_tdict.tool_memalign;   6892   info->tl_memalign = vgPlain_tdict.tool_memalign;
6893   info->tl___builtin_new = vgPlain_tdict.tool___builtin_new;   6893   info->tl___builtin_new = vgPlain_tdict.tool___builtin_new;
6894   info->tl___builtin_vec_new = vgPlain_tdict.tool___builtin_vec_new;   6894   info->tl___builtin_vec_new = vgPlain_tdict.tool___builtin_vec_new;
6895   info->tl_free = vgPlain_tdict.tool_free;   6895   info->tl_free = vgPlain_tdict.tool_free;
6896   info->tl___builtin_delete = vgPlain_tdict.tool___builtin_delete;   6896   info->tl___builtin_delete = vgPlain_tdict.tool___builtin_delete;
6897   info->tl___builtin_vec_delete = vgPlain_tdict.tool___builtin_vec_delete;   6897   info->tl___builtin_vec_delete = vgPlain_tdict.tool___builtin_vec_delete;
6898   info->tl_malloc_usable_size = vgPlain_tdict.tool_malloc_usable_size;   6898   info->tl_malloc_usable_size = vgPlain_tdict.tool_malloc_usable_size;
6899   info->mallinfo = & vgPlain_mallinfo;   6899   info->mallinfo = & vgPlain_mallinfo;
6900   info->clo_trace_malloc = vgPlain_clo_trace_malloc;   6900   info->clo_trace_malloc = vgPlain_clo_trace_malloc;
6901   while (1) {   6901   while (1) {
6902     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;   6902     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;
6903     while (1) {   6903     while (1) {
6904       if (vgPlain_tdict.track_post_reg_write) {   6904       if (vgPlain_tdict.track_post_reg_write) {
6905         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6905         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6906                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6906                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6907                                                 (SizeT )sizeof(UWord ));   6907                                                 (SizeT )sizeof(UWord ));
6908       } else {   6908       } else {
6909     6909  
6910       }   6910       }
6911       break;   6911       break;
6912     }   6912     }
6913     break;   6913     break;
6914   }   6914   }
6915   break;   6915   break;
6916   case 4098UL:   6916   case 4098UL:
6917   if (vgPlain_clo_verbosity > 2) {   6917   if (vgPlain_clo_verbosity > 2) {
6918     vgPlain_printf("client request: DISCARD_TRANSLATIONS, addr %p,  len %lu\n",   6918     vgPlain_printf("client request: DISCARD_TRANSLATIONS, addr %p,  len %lu\n",
6919                    (void *)*(arg + 1), *(arg + 2));   6919                    (void *)*(arg + 1), *(arg + 2));
6920   } else {   6920   } else {
6921     6921  
6922   }   6922   }
6923   vgPlain_discard_translations((Addr64 )*(arg + 1), (ULong )*(arg + 2),   6923   vgPlain_discard_translations((Addr64 )*(arg + 1), (ULong )*(arg + 2),
6924                                (HChar *)"scheduler(VG_USERREQ__DISCARD_TRANSLATIONS)");   6924                                (HChar *)"scheduler(VG_USERREQ__DISCARD_TRANSLATIONS)");
6925   while (1) {   6925   while (1) {
6926     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;   6926     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;
6927     while (1) {   6927     while (1) {
6928       if (vgPlain_tdict.track_post_reg_write) {   6928       if (vgPlain_tdict.track_post_reg_write) {
6929         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6929         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6930                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6930                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6931                                                 (SizeT )sizeof(UWord ));   6931                                                 (SizeT )sizeof(UWord ));
6932       } else {   6932       } else {
6933     6933  
6934       }   6934       }
6935       break;   6935       break;
6936     }   6936     }
6937     break;   6937     break;
6938   }   6938   }
6939   break;   6939   break;
6940   case 4609UL:   6940   case 4609UL:
6941   while (1) {   6941   while (1) {
6942     vgPlain_threads[tid].arch.vex.guest_EDX = vgPlain_get_n_errs_found();   6942     vgPlain_threads[tid].arch.vex.guest_EDX = vgPlain_get_n_errs_found();
6943     while (1) {   6943     while (1) {
6944       if (vgPlain_tdict.track_post_reg_write) {   6944       if (vgPlain_tdict.track_post_reg_write) {
6945         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6945         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6946                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6946                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6947                                                 (SizeT )sizeof(UWord ));   6947                                                 (SizeT )sizeof(UWord ));
6948       } else {   6948       } else {
6949     6949  
6950       }   6950       }
6951       break;   6951       break;
6952     }   6952     }
6953     break;   6953     break;
6954   }   6954   }
6955   break;   6955   break;
6956   case 5633UL:   6956   case 5633UL:
6957   vgPlain_di_notify_pdb_debuginfo((Int )*(arg + 1), *(arg + 2), *(arg + 3),   6957   vgPlain_di_notify_pdb_debuginfo((Int )*(arg + 1), *(arg + 2), *(arg + 3),
6958                                   (PtrdiffT )*(arg + 4));   6958                                   (PtrdiffT )*(arg + 4));
6959   while (1) {   6959   while (1) {
6960     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;   6960     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;
6961     while (1) {   6961     while (1) {
6962       if (vgPlain_tdict.track_post_reg_write) {   6962       if (vgPlain_tdict.track_post_reg_write) {
6963         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   6963         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
6964                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   6964                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
6965                                                 (SizeT )sizeof(UWord ));   6965                                                 (SizeT )sizeof(UWord ));
6966       } else {   6966       } else {
6967     6967  
6968       }   6968       }
6969       break;   6969       break;
6970     }   6970     }
6971     break;   6971     break;
6972   }   6972   }
6973   break;   6973   break;
6974   case 5889UL:   6974   case 5889UL:
6975   ip = *(arg + 1);   6975   ip = *(arg + 1);
6976   buf64 = (UChar *)*(arg + 2);   6976   buf64 = (UChar *)*(arg + 2);
6977   vgPlain_memset((void *)buf64, 0, (SizeT )64);   6977   vgPlain_memset((void *)buf64, 0, (SizeT )64);
6978   linenum = (UInt )0;   6978   linenum = (UInt )0;
6979   tmp___9 = vgPlain_get_filename_linenum(ip, (Char *)(buf64 + 0), 50,   6979   tmp___9 = vgPlain_get_filename_linenum(ip, (Char *)(buf64 + 0), 50,
6980                                          (Char *)((void *)0), 0,   6980                                          (Char *)((void *)0), 0,
6981                                          (Bool *)((void *)0), & linenum);   6981                                          (Bool *)((void *)0), & linenum);
6982   ok = tmp___9;   6982   ok = tmp___9;
6983   if (ok) {   6983   if (ok) {
6984     i = (UInt )0;   6984     i = (UInt )0;
6985     while (i < 50U) {   6985     while (i < 50U) {
6986       if ((int )*(buf64 + i) == 0) {   6986       if ((int )*(buf64 + i) == 0) {
6987         break;   6987         break;
6988       } else {   6988       } else {
6989     6989  
6990       }   6990       }
6991       i ++;   6991       i ++;
6992     }   6992     }
6993     tmp___10 = __builtin_expect((long )(! (! (i < 50U))), 1L);   6993     tmp___10 = __builtin_expect((long )(! (! (i < 50U))), 1L);
6994     if (tmp___10) {   6994     if (tmp___10) {
6995     6995  
6996     } else {   6996     } else {
6997       vgPlain_assert_fail((Bool )1, (Char const   *)"i < 50",   6997       vgPlain_assert_fail((Bool )1, (Char const   *)"i < 50",
6998                           (Char const   *)"m_scheduler/scheduler.c", 1662,   6998                           (Char const   *)"m_scheduler/scheduler.c", 1662,
6999                           (Char const   *)"do_client_request", "");   6999                           (Char const   *)"do_client_request", "");
7000     }   7000     }
7001     vgPlain_sprintf((Char *)(buf64 + i), ":%u", linenum);   7001     vgPlain_sprintf((Char *)(buf64 + i), ":%u", linenum);
7002   } else {   7002   } else {
7003     *(buf64 + 0) = (UChar )0;   7003     *(buf64 + 0) = (UChar )0;
7004   }   7004   }
7005   while (1) {   7005   while (1) {
7006     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;   7006     vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;
7007     while (1) {   7007     while (1) {
7008       if (vgPlain_tdict.track_post_reg_write) {   7008       if (vgPlain_tdict.track_post_reg_write) {
7009         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   7009         (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
7010                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   7010                                                 (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
7011                                                 (SizeT )sizeof(UWord ));   7011                                                 (SizeT )sizeof(UWord ));
7012       } else {   7012       } else {
7013     7013  
7014       }   7014       }
7015       break;   7015       break;
7016     }   7016     }
7017     break;   7017     break;
7018   }   7018   }
7019   break;   7019   break;
7020   case 4866UL:   7020   case 4866UL:
7021   case 4875UL:   7021   case 4875UL:
7022   case 4865UL:   7022   case 4865UL:
7023   if (! *(arg + 1)) {   7023   if (! *(arg + 1)) {
7024     while (1) {   7024     while (1) {
7025       vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;   7025       vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )0;
7026       while (1) {   7026       while (1) {
7027         if (vgPlain_tdict.track_post_reg_write) {   7027         if (vgPlain_tdict.track_post_reg_write) {
7028           (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   7028           (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
7029                                                   (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   7029                                                   (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
7030                                                   (SizeT )sizeof(UWord ));   7030                                                   (SizeT )sizeof(UWord ));
7031         } else {   7031         } else {
7032     7032  
7033         }   7033         }
7034         break;   7034         break;
7035       }   7035       }
7036       break;   7036       break;
7037     }   7037     }
7038     break;   7038     break;
7039   }   7039   }
7040   my_default:   7040   my_default:
7041   default:   7041   default:
7042   tmp___13 = os_client_request(tid, arg);   7042   tmp___13 = os_client_request(tid, arg);
7043   if (tmp___13) {   7043   if (tmp___13) {
7044     7044  
7045   } else   7045   } else
7046   if (vgPlain_needs.client_requests) {   7046   if (vgPlain_needs.client_requests) {
7047     if (vgPlain_clo_verbosity > 2) {   7047     if (vgPlain_clo_verbosity > 2) {
7048       vgPlain_printf("client request: code %lx,  addr %p,  len %lu\n",   7048       vgPlain_printf("client request: code %lx,  addr %p,  len %lu\n",
7049                      *(arg + 0), (void *)*(arg + 1), *(arg + 2));   7049                      *(arg + 0), (void *)*(arg + 1), *(arg + 2));
7050     } else {   7050     } else {
7051     7051  
7052     }   7052     }
7053     tmp___11 = __builtin_expect((long )(! (! vgPlain_tdict.tool_handle_client_request)),   7053     tmp___11 = __builtin_expect((long )(! (! vgPlain_tdict.tool_handle_client_request)),
7054                                 1L);   7054                                 1L);
7055     if (tmp___11) {   7055     if (tmp___11) {
7056     7056  
7057     } else {   7057     } else {
7058       vgPlain_assert_fail((Bool )0,   7058       vgPlain_assert_fail((Bool )0,
7059                           (Char const   *)"VG_(tdict).tool_handle_client_request",   7059                           (Char const   *)"VG_(tdict).tool_handle_client_request",
7060                           (Char const   *)"m_scheduler/scheduler.c", 1694,   7060                           (Char const   *)"m_scheduler/scheduler.c", 1694,
7061                           (Char const   *)"do_client_request",   7061                           (Char const   *)"do_client_request",
7062                           "you forgot to set VgToolInterface function \'tool_handle_client_request\'");   7062                           "you forgot to set VgToolInterface function \'tool_handle_client_request\'");
7063     }   7063     }
7064     tmp___12 = (*(vgPlain_tdict.tool_handle_client_request))(tid, arg, & ret);   7064     tmp___12 = (*(vgPlain_tdict.tool_handle_client_request))(tid, arg, & ret);
7065     if (tmp___12) {   7065     if (tmp___12) {
7066       while (1) {   7066       while (1) {
7067         vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )ret;   7067         vgPlain_threads[tid].arch.vex.guest_EDX = (UInt )ret;
7068         while (1) {   7068         while (1) {
7069           if (vgPlain_tdict.track_post_reg_write) {   7069           if (vgPlain_tdict.track_post_reg_write) {
7070             (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,   7070             (*(vgPlain_tdict.track_post_reg_write))((CorePart )6, tid,
7071                                                     (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),   7071                                                     (PtrdiffT )((Int )((HWord )(& ((VexGuestArchState *)0)->guest_EDX))),
7072                                                     (SizeT )sizeof(UWord ));   7072                                                     (SizeT )sizeof(UWord ));
7073           } else {   7073           } else {
7074     7074  
7075           }   7075           }
7076           break;   7076           break;
7077         }   7077         }
7078         break;   7078         break;
7079       }   7079       }
7080     } else {   7080     } else {
7081     7081  
7082     }   7082     }
7083   } else   7083   } else
7084   if (! whined) {   7084   if (! whined) {
7085     if (vgPlain_clo_verbosity > 2) {   7085     if (vgPlain_clo_verbosity > 2) {
7086       c1 = (Char )((*(arg + 0) >> 24) & 255UL);   7086       c1 = (Char )((*(arg + 0) >> 24) & 255UL);
7087       c2 = (Char )((*(arg + 0) >> 16) & 255UL);   7087       c2 = (Char )((*(arg + 0) >> 16) & 255UL);
7088       if ((int )c1 == 0) {   7088       if ((int )c1 == 0) {
7089         c1 = (Char )'_';   7089         c1 = (Char )'_';
7090       } else {   7090       } else {
7091     7091  
7092       }   7092       }
7093       if ((int )c2 == 0) {   7093       if ((int )c2 == 0) {
7094         c2 = (Char )'_';   7094         c2 = (Char )'_';
7095       } else {   7095       } else {
7096     7096  
7097       }   7097       }
7098       vgPlain_message((VgMsgKind )1,   7098       vgPlain_message((VgMsgKind )1,
7099                       "Warning:\n  unhandled client request: 0x%lx (%c%c+0x%lx).  Perhaps\n  VG_(needs).client_requests should be set?\n",   7099                       "Warning:\n  unhandled client request: 0x%lx (%c%c+0x%lx).  Perhaps\n  VG_(needs).client_requests should be set?\n",
7100                       *(arg + 0), (int )c1, (int )c2, *(arg + 0) & 65535UL);   7100                       *(arg + 0), (int )c1, (int )c2, *(arg + 0) & 65535UL);
7101       whined = (Bool )1;   7101       whined = (Bool )1;
7102     } else {   7102     } else {
7103     7103  
7104     }   7104     }
7105   } else {   7105   } else {
7106     7106  
7107   }   7107   }
7108   break;   7108   break;
7109   }   7109   }
7110   return;   7110   return;
7111   va_list_casting_error_NORETURN:   7111   va_list_casting_error_NORETURN:
7112   vgPlain_umsg("Valgrind: fatal error - cannot continue: use of the deprecated\nclient requests VG_USERREQ__PRINTF or VG_USERREQ__PRINTF_BACKTRACE\non a platform where they cannot be supported.  Please use the\nequivalent _VALIST_BY_REF versions instead.\n\nThis is a binary-incompatible change in Valgrind\'s client request\nmechanism.  It is unfortunate, but difficult to avoid.  End-users\nare expected to almost never see this message.  The only case in\nwhich you might see this message is if your code uses the macros\nVALGRIND_PRINTF or VALGRIND_PRINTF_BACKTRACE.  If so, you will need\nto recompile such code, using the header files from this version of\nValgrind, and not any previous version.\n\nIf you see this mesage in any other circumstances, it is probably\na bug in Valgrind.  In this case, please file a bug report at\n\n   http://www.valgrind.org/support/bug_reports.html\n\nWill now abort.\n");   7112   vgPlain_umsg("Valgrind: fatal error - cannot continue: use of the deprecated\nclient requests VG_USERREQ__PRINTF or VG_USERREQ__PRINTF_BACKTRACE\non a platform where they cannot be supported.  Please use the\nequivalent _VALIST_BY_REF versions instead.\n\nThis is a binary-incompatible change in Valgrind\'s client request\nmechanism.  It is unfortunate, but difficult to avoid.  End-users\nare expected to almost never see this message.  The only case in\nwhich you might see this message is if your code uses the macros\nVALGRIND_PRINTF or VALGRIND_PRINTF_BACKTRACE.  If so, you will need\nto recompile such code, using the header files from this version of\nValgrind, and not any previous version.\n\nIf you see this mesage in any other circumstances, it is probably\na bug in Valgrind.  In this case, please file a bug report at\n\n   http://www.valgrind.org/support/bug_reports.html\n\nWill now abort.\n");
7113   tmp___14 = __builtin_expect(0L, 1L);   7113   tmp___14 = __builtin_expect(0L, 1L);
7114   if (tmp___14) {   7114   if (tmp___14) {
7115     7115  
7116   } else {   7116   } else {
7117     vgPlain_assert_fail((Bool )1, (Char const   *)"0",   7117     vgPlain_assert_fail((Bool )1, (Char const   *)"0",
7118                         (Char const   *)"m_scheduler/scheduler.c", 1740,   7118                         (Char const   *)"m_scheduler/scheduler.c", 1740,
7119                         (Char const   *)"do_client_request", "");   7119                         (Char const   *)"do_client_request", "");
7120   }   7120   }
7121   return;   7121   return;
7122 }   7122 }
7123 }   7123 }
7124 static void scheduler_sanity(ThreadId tid ) ;   7124 static void scheduler_sanity(ThreadId tid ) ;
7125 static UInt lasttime  =    (UInt )0;   7125 static UInt lasttime  =    (UInt )0;
7126 static void scheduler_sanity(ThreadId tid )   7126 static void scheduler_sanity(ThreadId tid )
7127 {   7127 {
7128   Bool bad ;   7128   Bool bad ;
7129   UInt now ;   7129   UInt now ;
7130   Int lwpid ;   7130   Int lwpid ;
7131   Int tmp ;   7131   Int tmp ;
7132   Bool tmp___0 ;   7132   Bool tmp___0 ;
7133   Int tmp___1 ;   7133   Int tmp___1 ;
7134     7134  
7135   {   7135   {
7136   bad = (Bool )0;   7136   bad = (Bool )0;
7137   tmp = vgPlain_gettid();   7137   tmp = vgPlain_gettid();
7138   lwpid = tmp;   7138   lwpid = tmp;
7139   tmp___0 = vgPlain_is_running_thread(tid);   7139   tmp___0 = vgPlain_is_running_thread(tid);
7140   if (tmp___0) {   7140   if (tmp___0) {
7141     7141  
7142   } else {   7142   } else {
7143     vgPlain_message((VgMsgKind )2,   7143     vgPlain_message((VgMsgKind )2,
7144                     "Thread %d is supposed to be running, but doesn\'t own the_BigLock (owned by %d)\n",   7144                     "Thread %d is supposed to be running, but doesn\'t own the_BigLock (owned by %d)\n",
7145                     tid, vgPlain_running_tid);   7145                     tid, vgPlain_running_tid);
7146     bad = (Bool )1;   7146     bad = (Bool )1;
7147   }   7147   }
7148   if (lwpid != vgPlain_threads[tid].os_state.lwpid) {   7148   if (lwpid != vgPlain_threads[tid].os_state.lwpid) {
7149     tmp___1 = vgPlain_gettid();   7149     tmp___1 = vgPlain_gettid();
7150     vgPlain_message((VgMsgKind )2,   7150     vgPlain_message((VgMsgKind )2,
7151                     "Thread %d supposed to be in LWP %d, but we\'re actually %d\n",   7151                     "Thread %d supposed to be in LWP %d, but we\'re actually %d\n",
7152                     tid, vgPlain_threads[tid].os_state.lwpid, tmp___1);   7152                     tid, vgPlain_threads[tid].os_state.lwpid, tmp___1);
7153     bad = (Bool )1;   7153     bad = (Bool )1;
7154   } else {   7154   } else {
7155     7155  
7156   }   7156   }
7157   if (lwpid != the_BigLock.owner_lwpid) {   7157   if (lwpid != the_BigLock.owner_lwpid) {
7158     vgPlain_message((VgMsgKind )2,   7158     vgPlain_message((VgMsgKind )2,
7159                     "Thread (LWPID) %d doesn\'t own the_BigLock\n", tid);   7159                     "Thread (LWPID) %d doesn\'t own the_BigLock\n", tid);
7160     bad = (Bool )1;   7160     bad = (Bool )1;
7161   } else {   7161   } else {
7162     7162  
7163   }   7163   }
7164   now = vgPlain_read_millisecond_timer();   7164   now = vgPlain_read_millisecond_timer();
7165   if (bad) {   7165   if (bad) {
7166     vgPlain_core_panic((Char *)"scheduler_sanity: failed");   7166     vgPlain_core_panic((Char *)"scheduler_sanity: failed");
7167   } else {   7167   } else {
7168     7168  
7169   }   7169   }
7170   return;   7170   return;
7171 }   7171 }
7172 }   7172 }
7173 void vgPlain_sanity_check_general(Bool force_expensive ) ;   7173 void vgPlain_sanity_check_general(Bool force_expensive ) ;
7174 static UInt next_slow_check_at  =    (UInt )1;   7174 static UInt next_slow_check_at  =    (UInt )1;
7175 void vgPlain_sanity_check_general(Bool force_expensive ) ;   7175 void vgPlain_sanity_check_general(Bool force_expensive ) ;
7176 static UInt slow_check_interval  =    (UInt )25;   7176 static UInt slow_check_interval  =    (UInt )25;
7177 void vgPlain_sanity_check_general(Bool force_expensive )   7177 void vgPlain_sanity_check_general(Bool force_expensive )
7178 {   7178 {
7179   ThreadId tid ;   7179   ThreadId tid ;
7180   long tmp ;   7180   long tmp ;
7181   Bool tmp___0 ;   7181   Bool tmp___0 ;
7182   int tmp___1 ;   7182   int tmp___1 ;
7183   long tmp___2 ;   7183   long tmp___2 ;
7184   long tmp___3 ;   7184   long tmp___3 ;
7185   Bool tmp___4 ;   7185   Bool tmp___4 ;
7186   int tmp___5 ;   7186   int tmp___5 ;
7187   long tmp___6 ;   7187   long tmp___6 ;
7188   SizeT remains ;   7188   SizeT remains ;
7189   VgStack *stack ;   7189   VgStack *stack ;
7190   ThreadState *tmp___7 ;   7190   ThreadState *tmp___7 ;
7191   SizeT limit ;   7191   SizeT limit ;
7192     7192  
7193   {   7193   {
7194   if (vgPlain_clo_sanity_level < 1) {   7194   if (vgPlain_clo_sanity_level < 1) {
7195     return;   7195     return;
7196   } else {   7196   } else {
7197     7197  
7198   }   7198   }
7199   sanity_fast_count ++;   7199   sanity_fast_count ++;
7200   if (vgPlain_needs.sanity_checks) {   7200   if (vgPlain_needs.sanity_checks) {
7201     tmp = __builtin_expect((long )(! (! vgPlain_tdict.tool_cheap_sanity_check)),   7201     tmp = __builtin_expect((long )(! (! vgPlain_tdict.tool_cheap_sanity_check)),
7202                            1L);   7202                            1L);
7203     if (tmp) {   7203     if (tmp) {
7204     7204  
7205     } else {   7205     } else {
7206       vgPlain_assert_fail((Bool )0,   7206       vgPlain_assert_fail((Bool )0,
7207                           (Char const   *)"VG_(tdict).tool_cheap_sanity_check",   7207                           (Char const   *)"VG_(tdict).tool_cheap_sanity_check",
7208                           (Char const   *)"m_scheduler/scheduler.c", 1816,   7208                           (Char const   *)"m_scheduler/scheduler.c", 1816,
7209                           (Char const   *)"vgPlain_sanity_check_general",   7209                           (Char const   *)"vgPlain_sanity_check_general",
7210                           "you forgot to set VgToolInterface function \'tool_cheap_sanity_check\'");   7210                           "you forgot to set VgToolInterface function \'tool_cheap_sanity_check\'");
7211     }   7211     }
7212     tmp___0 = (*(vgPlain_tdict.tool_cheap_sanity_check))();   7212     tmp___0 = (*(vgPlain_tdict.tool_cheap_sanity_check))();
7213     if (tmp___0) {   7213     if (tmp___0) {
7214       tmp___1 = 1;   7214       tmp___1 = 1;
7215     } else {   7215     } else {
7216       tmp___1 = 0;   7216       tmp___1 = 0;
7217     }   7217     }
7218     tmp___2 = __builtin_expect((long )tmp___1, 1L);   7218     tmp___2 = __builtin_expect((long )tmp___1, 1L);
7219     if (tmp___2) {   7219     if (tmp___2) {
7220     7220  
7221     } else {   7221     } else {
7222       vgPlain_assert_fail((Bool )1,   7222       vgPlain_assert_fail((Bool )1,
7223                           (Char const   *)"VG_TDICT_CALL(tool_cheap_sanity_check)",   7223                           (Char const   *)"VG_TDICT_CALL(tool_cheap_sanity_check)",
7224                           (Char const   *)"m_scheduler/scheduler.c", 1816,   7224                           (Char const   *)"m_scheduler/scheduler.c", 1816,
7225                           (Char const   *)"vgPlain_sanity_check_general", "");   7225                           (Char const   *)"vgPlain_sanity_check_general", "");
7226     }   7226     }
7227   } else {   7227   } else {
7228     7228  
7229   }   7229   }
7230   if (force_expensive) {   7230   if (force_expensive) {
7231     goto _L;   7231     goto _L;
7232   } else   7232   } else
7233   if (vgPlain_clo_sanity_level > 1) {   7233   if (vgPlain_clo_sanity_level > 1) {
7234     goto _L;   7234     goto _L;
7235   } else   7235   } else
7236   if (vgPlain_clo_sanity_level == 1) {   7236   if (vgPlain_clo_sanity_level == 1) {
7237     if (sanity_fast_count == next_slow_check_at) {   7237     if (sanity_fast_count == next_slow_check_at) {
7238       _L: /* CIL Label */   7238       _L: /* CIL Label */
7239       next_slow_check_at = (sanity_fast_count - 1U) + slow_check_interval;   7239       next_slow_check_at = (sanity_fast_count - 1U) + slow_check_interval;
7240       slow_check_interval ++;   7240       slow_check_interval ++;
7241       sanity_slow_count ++;   7241       sanity_slow_count ++;
7242       if (vgPlain_needs.sanity_checks) {   7242       if (vgPlain_needs.sanity_checks) {
7243         tmp___3 = __builtin_expect((long )(! (! vgPlain_tdict.tool_expensive_sanity_check)),   7243         tmp___3 = __builtin_expect((long )(! (! vgPlain_tdict.tool_expensive_sanity_check)),
7244                                    1L);   7244                                    1L);
7245         if (tmp___3) {   7245         if (tmp___3) {
7246     7246  
7247         } else {   7247         } else {
7248           vgPlain_assert_fail((Bool )0,   7248           vgPlain_assert_fail((Bool )0,
7249                               (Char const   *)"VG_(tdict).tool_expensive_sanity_check",   7249                               (Char const   *)"VG_(tdict).tool_expensive_sanity_check",
7250                               (Char const   *)"m_scheduler/scheduler.c", 1836,   7250                               (Char const   *)"m_scheduler/scheduler.c", 1836,
7251                               (Char const   *)"vgPlain_sanity_check_general",   7251                               (Char const   *)"vgPlain_sanity_check_general",
7252                               "you forgot to set VgToolInterface function \'tool_expensive_sanity_check\'");   7252                               "you forgot to set VgToolInterface function \'tool_expensive_sanity_check\'");
7253         }   7253         }
7254         tmp___4 = (*(vgPlain_tdict.tool_expensive_sanity_check))();   7254         tmp___4 = (*(vgPlain_tdict.tool_expensive_sanity_check))();
7255         if (tmp___4) {   7255         if (tmp___4) {
7256           tmp___5 = 1;   7256           tmp___5 = 1;
7257         } else {   7257         } else {
7258           tmp___5 = 0;   7258           tmp___5 = 0;
7259         }   7259         }
7260         tmp___6 = __builtin_expect((long )tmp___5, 1L);   7260         tmp___6 = __builtin_expect((long )tmp___5, 1L);
7261         if (tmp___6) {   7261         if (tmp___6) {
7262     7262  
7263         } else {   7263         } else {
7264           vgPlain_assert_fail((Bool )1,   7264           vgPlain_assert_fail((Bool )1,
7265                               (Char const   *)"VG_TDICT_CALL(tool_expensive_sanity_check)",   7265                               (Char const   *)"VG_TDICT_CALL(tool_expensive_sanity_check)",
7266                               (Char const   *)"m_scheduler/scheduler.c", 1836,   7266                               (Char const   *)"m_scheduler/scheduler.c", 1836,
7267                               (Char const   *)"vgPlain_sanity_check_general", "");   7267                               (Char const   *)"vgPlain_sanity_check_general", "");
7268         }   7268         }
7269       } else {   7269       } else {
7270     7270  
7271       }   7271       }
7272       tid = (ThreadId )1;   7272       tid = (ThreadId )1;
7273       while (tid < 500U) {   7273       while (tid < 500U) {
7274         if ((unsigned int )vgPlain_threads[tid].status == 0U) {   7274         if ((unsigned int )vgPlain_threads[tid].status == 0U) {
7275           goto __Cont;   7275           goto __Cont;
7276         } else   7276         } else
7277         if ((unsigned int )vgPlain_threads[tid].status == 5U) {   7277         if ((unsigned int )vgPlain_threads[tid].status == 5U) {
7278           goto __Cont;   7278           goto __Cont;
7279         } else {   7279         } else {
7280     7280  
7281         }   7281         }
7282         tmp___7 = vgPlain_get_ThreadState(tid);   7282         tmp___7 = vgPlain_get_ThreadState(tid);
7283         stack = (VgStack *)tmp___7->os_state.valgrind_stack_base;   7283         stack = (VgStack *)tmp___7->os_state.valgrind_stack_base;
7284         limit = (SizeT )4096;   7284         limit = (SizeT )4096;
7285         remains = vgPlain_am_get_VgStack_unused_szB(stack, limit);   7285         remains = vgPlain_am_get_VgStack_unused_szB(stack, limit);
7286         if (remains < limit) {   7286         if (remains < limit) {
7287           vgPlain_message((VgMsgKind )2,   7287           vgPlain_message((VgMsgKind )2,
7288                           "WARNING: Thread %d is within %ld bytes of running out of stack!\n",   7288                           "WARNING: Thread %d is within %ld bytes of running out of stack!\n",
7289                           tid, remains);   7289                           tid, remains);
7290         } else {   7290         } else {
7291     7291  
7292         }   7292         }
7293         __Cont: /* CIL Label */   7293         __Cont: /* CIL Label */
7294         tid ++;   7294         tid ++;
7295       }   7295       }
7296     } else {   7296     } else {
7297     7297  
7298     }   7298     }
7299   } else {   7299   } else {
7300     7300  
7301   }   7301   }
7302   if (vgPlain_clo_sanity_level > 1) {   7302   if (vgPlain_clo_sanity_level > 1) {
7303     vgPlain_sanity_check_malloc_all();   7303     vgPlain_sanity_check_malloc_all();
7304   } else {   7304   } else {
7305     7305  
7306   }   7306   }
7307   return;   7307   return;
7308 }   7308 }
7309 }   7309 }